SQL

Truncate vs Delete Commands in SQL

TRUNCATEDELETE
It is a DDL commandIt is a DML command
It will delete all rows at a time but can't delete a specific row from a table.It can delete all rows at a time and also delete specific row from a table.
It doesn't support where condition.It does support where condition.
it is a permanent data deletion from a table. It is a temporary data deletion from a table.
we can't rollback a deleted data into a table[restoring data is not possible]. we can rollback a deleted data into a table[restoring data is possible].
Execution speed is fast.Execution speed is slow.

About the author

karunakar

I completed the M.TECH, am enthusiastic to finding the gadgets & learning new things.

Add Comment

Click here to post a comment