What is the difference between DELETE TABLE and TRUNCATE TABLE commands

Q

What is the difference between DELETE TABLE and TRUNCATE TABLE commands?

✍: Guest

A

Following are difference between them
? DELETE TABLE syntax logs the deletes thus make the delete operation slow. TRUNCATE table does not log any information but it logs information about deallocation of data page of the table so TRUNCATE table is faster as compared to delete table.
? DELETE table can have criteria while TRUNCATE can not.
? TRUNCATE table can not trigger.

2007-10-25, 4686👍, 0💬