cancel
Showing results for 
Search instead for 
Did you mean: 

truncate in oracle

Former Member
0 Kudos

Can you tell me what use for commit statement is?

Truncate table.

  • If we use commit here what will happen?

Commit.

Truncate table.

• If we didn’t use commit what will happen?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

With SQL languaje, you can execute various types of instructions:

-DML (Data Manipulation Languaje): INSERT, UPDATE, DELETE and MERGE.

-DDL (Data Definition Languaje): CREATE, DROP, TRUNCATE, RENAME and ALTER.

-DCL (Data Control Languaje): GRANT and REVOKE.

-SELECT

-Transference Instructions (to administrate the changes made by the DML instructions): ROLLBACK, COMMIT and SAVEPOINT.

So, if you run a DML command and want to make it permanent, you need to run COMMIT.

But the DDL instructions (as Truncate) don't need a COMMIT, they're "immediate changes".

Hope this helps you.

Regards,

JC Llanes.

Former Member
0 Kudos

Thx much.. assign'd full pts Juo...........

Answers (0)