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 view in sql?

562


Explain different types of lock modes in sql server 2000?

524


How to specify the collation for a character data type in ms sql server?

557


What are the aggregate and scalar functions?

527


what are the different types of SSRS reports?

112






How can I get data from a database on another server?

515


What do you mean by data integrity?

601


What are the advantages dts has over bcp?

535


Explain filestream storage of sql server 2008?

520


What is always encrypted?

520


why would you call update statistics? : Sql server database administration

577


What are user-defined functions (udfs) in sql server?

572


What happens when converting big values to numeric data types?

571


How to write a query with a right outer join in ms sql server?

483


what is the system function to get the current user's user id? : Sql server database administration

558