What is difference between Delete and truncate?
Truncate :
- Truncate remove all the records from table at one go.
- It is DDL statement because it delete the auto increment or identity sequence from table
- It can not use where condition.
- It is faster than delete
- Truncate can not be rollback
Delete :
- Delete Statement delete the records one by one if does not included where clause
- it is DML statement, because it does not delete the auto increment or identity sequence from table when new records is inserted.
- It can use where condition.
- It is slower than truncate
- Delete records can be rollback