Home > Interview Questions > SQL Server > what is difference between delete and truncate

what is difference between delete and truncate

by angappan   on 06/12/2013   Category: SQL Server   |  Level: Beginner   |  Views: 2240    |  Points: 25     |  Bronze 

1. delete is DML command
2. you delete the table, that table structure also deleted.
3. Roll back possible
4. its working slow. because for logs.

1. Truncate is DDL Command
2. once you Truncate table, table structure not deleted. only records deleted.
3. if you use identity on the table, the table identity would come at first.
4. Roll back not possible
5. its working fast.

for both:
once you delete or truncate the table records you can possible to again roll back. (When you use TRANSACTION command)

« What is Execute Scalar? How many values are return? single value or Multiple value
» difference between Union and Union All?
Post Question  |  Question Home

Recent Posts

User Responses

No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts

1 ??????? ?? ????? New! Forum