What's the difference between DELETE TABLE and TRUNCATE
TABLE commands?
Answer Posted / nageswarao
1.truncate is DDL cmd.where as delete is a DML cmd.
2.truncate is similar to delete command without no
condition.
3.when u use truncate it restructure the table,wthout
bothering of data it deletes entire records.
but,delete is a logged transaction.before delete
records it copies to transaction log.then removes.
4.truncate take less time than delete in execution.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What do you mean by an execution plan? Why is it used? How would you view it?
What is difference between index and primary key?
what is the maximum size of a row? : Sql server database administration
How are the exceptions handled in sql server programming?
What is the difference between varchar and varchar types?
What is the purpose of self join?
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?
What does it mean to invest in the index?
Why we need sql server?
How to modify an existing user defined function?
In which format does an image save in SQL Server database ?
Can an entity have two primary keys?
Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
What are scheduled tasks in sql server?
What are triggers? How do you invoke a trigger on demand?