What is difference between TRUNCATE & DELETE?
Answer Posted / swapnareddy
Main Differences between Truncate and Delete:
Truncate:
1:Truncate removes all records but using this we cannot
remove a particular record.
2:Truncate is ddl command(data definiton language command)
3:Rollback cannot be done when we use this command.
4:Truncate cannot fire a trigger.
Delete:
1:delete can remove all records or a particular record.
2:delete is a dml command(data manipulation language command)
3:rollback is possible when we use this command.
4:delete can fire a trigger
| Is This Answer Correct ? | 19 Yes | 1 No |
Post New Answer View All Answers
How to use transactions efficiently : transact sql
Can I join the same table twice?
What is sqlite format?
What are the different ddl commands in sql?
what is 'mysqladmin' in mysql? : Sql dba
What are sql ddl commands?
explain advantages of myisam over innodb? : Sql dba
Can we edit a view in sql?
Can we rollback after truncate?
What are the operators used in select statements?
Define overloaded procedure?
What is sharding in sql?
how to create a new table in mysql? : Sql dba
what is the difference between blob and text? : Sql dba
What will you get by the cursor attribute sql%notfound?