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


Please Help Members By Posting Answers For Below Questions

What is TDS(Tabular Data Stream) Gateway?

99


What are group functions in query statements in ms sql server?

551


What is a synonym for manipulation?

545


How do I find the query plan in sql server?

545


How do you make a trace?

580






Where are stored procedures in sql server?

564


Which is the best place or learning center for MS SQL?????In Bangladesh?????

1594


What is subquery in sql?

566


What is encryption key?

84


What is the command used to check locks in microsoft sql server?

540


Explain indexed views and partitioned view with their syntax.

682


Explain what is scheduled job and how to create it?

542


Explain syntax for viewing, dropping and disabling triggers?

502


How do I get to sql server configuration manager?

513


How to create stored procedures with parameters in ms sql server?

526