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

Can we use trigger new in before insert?

679


How to list all login names on the ms sql server?

699


What is user defined datatypes and when you should go for them?

769


How to create a simple table to test triggers in ms sql server?

680


What is 1nf 2nf and 3nf?

666






Explain the cursor lock types?

739


How to find related tables in sql server?

684


What is named query? : sql server analysis services, ssas

690


how many clustered indexes can be created on a table? : Sql server database administration

774


How to change server name in sql server?

792


What is the difference between an index and a unique index?

739


What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

802


What is the difference between set and select?

740


What does it mean to normalize a database and why would you do it?

725


What is the maximum size of sql server database?

690