Delete can be rolled back but Truncate cannot be rolled back.
Begin Transaction
Delete Del_Details
Rollback
and i'm getting my deleted records
but still when i use ....
Begin Transaction
Truncate Table Del_Details
Rollback
This command is also giving me my deleted records..
So where is the difference between Delete and Truncate in respect of Rollback.......Plz explain
Manoj BishtPosted May 22, 2008, 2:32 AM
KiranPosted May 21, 2008, 2:52 PM
Delete and Truncate both can be rollbacked. There is no difference between them as far as rollback perspective but there are other differences.
Truncate is faster and will reset any identity columns to the default seed value.
You cannot TRUNCATE a table that has any foreign key constraints. You will have to remove the contraints, TRUNCATE the table, and reapply the contraints.