By
Mohanabalasankari R
DELETE TRUNCATE
DDL (Data Definition Language)
command
DML (Data Manipulation Language)
command
Removes a single, multiple or all records
from the table
Removes all the records from the table
Records removed can be rolled back Cannot be rolled back and changes are
permanent
Can specify a condition using WHERE
clause
Not possible to use where clause
Slower compared to truncate Faster compared to delete
DIFFERENCE
SYNTAX FOR DELETE SYNTAX FOR TRUNCATE
TO DELETE ONE RECORD:
Delete from table_name where
column_name = some value
TO DELETE ALL RECORDS:
Delete from table_name
TO TRUNCATE TABLE:
Truncate table table_name

Difference between DELETE and TRUNCATE.pptx

  • 1.
  • 2.
    DELETE TRUNCATE DDL (DataDefinition Language) command DML (Data Manipulation Language) command Removes a single, multiple or all records from the table Removes all the records from the table Records removed can be rolled back Cannot be rolled back and changes are permanent Can specify a condition using WHERE clause Not possible to use where clause Slower compared to truncate Faster compared to delete DIFFERENCE
  • 3.
    SYNTAX FOR DELETESYNTAX FOR TRUNCATE TO DELETE ONE RECORD: Delete from table_name where column_name = some value TO DELETE ALL RECORDS: Delete from table_name TO TRUNCATE TABLE: Truncate table table_name