Difference between DELETE, DROP and TRUNCATE (original) (raw)

Last Updated : 5 Jan, 2026

In SQL, understanding the DELETE, DROP, and TRUNCATE commands is important for efficient data management. While these commands are all used to remove data, they differ significantly in functionality, usage, and performance. Knowing when and how to use each command can improve the efficiency and integrity of our database.

**Comparison Between DELETE, DROP, and TRUNCATE

The following table lists all the major differences between DELETE, DROP, and TRUNCATE:

**Parameter **DELETE **DROP **TRUNCATE
**Type DML DDL DDL
**Purpose Deletes specific rows based on a condition Deletes the entire table or database Deletes all rows but retains table structure
**Syntax DELETE FROM table_name WHERE condition; DROP TABLE table_name; TRUNCATE TABLE table_name;
**Rollback Support Can be Rollback Cannot be Rollback Cannot be Rollback
**Data Removal Removes selected rows Removes table and data completely Removes all rows
**Efficiency Slower, as each row is processed individually Instant removal, affecting schema Faster than DELETE but slower than DROP
**Triggers Fires triggers Does not fire triggers Does not fire triggers

1. DELETE Command in SQL

The DELETE command is a Data Manipulation Language (DML) operation used to remove specific rows from a table based on a given condition. With the help of the “DELETE” command, we can either delete all the rows in one go or delete rows one by one. i.e., we can use it as per the requirement or the condition using the Where clause. It is comparatively slower than the TRUNCATE command

**Syntax

DELETE from;

DELETE FROM table_name WHERE condition;

**Note :Here we can use the “*ROLLBACK*” command to restore the tuple because it does not auto-commit.

**2. DROP

The DROP command is a Data Definition Language (DDL) operation used to completely **remove a table, its **structure, and all its data from the **database. Once executed, the table is permanently deleted and **cannot be recovered unless from a backup.

**Syntax

To drop a table:

DROP table ;

Note - Here we can’t restore the table by using the “ROLLBACK” command because it auto commits.

**3. TRUNCATE

The TRUNCATE command is also a Data Definition Language (DDL) operation. It is used to remove all rows from a table efficiently, without deleting the table’s structure. By using this command the existence of all the rows of the table is lost. It is comparatively faster than the delete command as it deletes all the rows fastly.

**Syntax

To truncate a table:

TRUNCATE table ;

**Note: Here we can’t restore the tuples of the table by using the “ROLLBACK” command.