What's the difference between DELETE TABLE and TRUNCATE
TABLE commands?

Answer Posted / satya

1.Both Truncate and Delete are rollbacked in TSQL.
2.Truncate maintains single record in Transaction log
entire records where Delete writes one-to-one record which
is slow in performance.
3.Truncate reinitializes the IDENTITY count to zero.
4.Truncate gives error with Table Variables.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what is de-normalization and what are some of the examples of it?

565


What is query parameter in ssrs?

118


What is the difference between migration and upgradation in sql server?

602


What is the server name in sql server?

555


What are the advantages of user-defined functions over stored procedures in sql server?

458






What is an index in sql?

548


What are data regions?

90


Are semicolons required at the end of sql statements in sql server 2005?

565


What are the encryption mechanisms in sql server?

574


What is the maximum size of sql server database?

501


What is self contained scalar sub query?

533


How can we improve performance by using SQL Server profiler?

571


What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?

685


What is normalization process?

597


What is replace and stuff function in sql server?

561