Difference between turncate and delete

What is difference between turncate and delete

answer: logging of deleted rows

:slight_smile:

what is the difference between asking for information in a forum and looking it up in the manual yourself?

Assuming you’ve started a transaction, or have auto commit disabled (which it almost never is), yes. Otherwise it’ll just delete everything no questions asked all the same, without the need for manually committing anything.

Truncate an Delete both are used to delete data from the table. These both command will only delete data of the specified table, they cannot remove the whole table data structure.Both statements delete the data from the table not the structure of the table.

Truncate is a dll command. Delete is a dml command. Truncate cannot be rolled back. All of the memory space is put back into the server after you use truncate.