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.

svg viewer

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
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved