Difference between DELETE, DROP and TRUNCATE

Last Updated : 2 Sep, 2026

DELETE, DROP and TRUNCATE are SQL commands used to remove data or database objects, but they work differently.

  • DELETE removes specific rows from a table and can be used with a WHERE clause.
  • TRUNCATE removes all rows from a table while keeping the table structure intact.
  • DROP removes the entire table, including its data and structure.

The table below shows the major differences between DELETE, TRUNCATE and DROP:

DELETETRUNCATEDROP
Removes selected rows from a table.Removes all rows from a table.Removes the entire table.
Can be used with a WHERE clause.Cannot be used with a WHERE clause.No WHERE clause is required.
Table structure remains intact.Table structure remains intact.Table structure is deleted.
Generally slower for removing large amounts of data.Generally faster for removing all rows.Removes the table completely.
Is a DML command.Is a DDL command.Is a DDL command.
Can remove specific rows based on a condition.Removes all records at once.Removes the table and all its records.
Example: DELETE FROM Students WHERE id = 5;Example: TRUNCATE TABLE Students;Example: DROP TABLE Students;

Example of DELETE, TRUNCATE and DROP

The following examples demonstrate how DELETE, TRUNCATE and DROP work and how they affect the table.

Screenshot-2026-08-20-141951

Query:

DELETE FROM employee
WHERE employee_id = 5;

Output:

Screenshot-2026-08-20-142018

Query:

TRUNCATE TABLE employee;

Output:

10

Query:

DROP TABLE employee;

Output:

Screenshot-2026-02-06-121733
Comment