What is the difference between DELETE and TRUNCATE?

Answer Posted / satyajit patel

DELETE: DML, Manual Commit, Till not committed can be
rollback, can be applied for both row level as well as
table level, can be used in trigger, doesn't release memory.

TRUNCATE: DDL, auto commit, cann't rollback, applied table
level, cann't be used in trigger, releases memory.

In both cases structure remains.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are null values same as that of zero or a blank space?

533


How to order siblings in oracle hierarchy queries?

600


How do you copy a table in sql?

563


What is pl/sql language case sensitive?

635


What are the different parts of a package?

635






How would you reference column values before and after you have inserted and deleted triggers?

622


How do you know if a relationship is 2nf?

519


What are string functions in sql?

678


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

511


What is the maximum number of columns in sql table?

551


what is the difference between sql and t-sql? : Transact sql

603


how can we find the number of rows in a table using mysql? : Sql dba

586


explain the delete statements in sql

583


Explain the types of joins in sql?

573


how to enter characters as hex numbers? : Sql dba

571