Truncate vs. Delete
Truncate and Delete are the two commands used to delete a table’s data in SQL. Both of these commands are used for the same purpose, but there is still a slight difference between them.
Main differences
| Truncate | Delete |
|---|---|
Truncate typically resets the identity of a particular table. |
Delete only deletes the data and does not reset the identity of the table. |
Truncate comes with the word TABLE. |
Delete comes with the word FROM. |
Truncate is a data definition language (DDL) command. |
Delete is a data manipulation language (DML) command. |
Truncate does not maintain a log; hence, it is fast. |
Delete maintains a log; hence, it is slow. |
Syntax
Suppose that the table Educative needs to be deleted from the SQL.
Truncate
Truncate TABLE Educative
Delete
Delete FROM Educative
Free Resources
Copyright ©2025 Educative, Inc. All rights reserved