Friday, June 22, 2007

Delete And Truncate

Question:
What is the difference between TRUNCATE and DELETE?
Answer:
The Delete command will log the data changes in the log file where as the truncate will simply remove the data without it. Hence Data removed by Delete command can be rolled back but not the data removed by TRUNCATE. Truncate is a DDL statement whereas DELETE is a DML statement.

No comments: