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

Is it possible in sql table to have more than one foreign key?

616


Explain temporary table vs table variable by using cursor alternative?

528


Give the query of getting last two records from the table in SQL SERVER?

543


How to delete duplicate rows from table except one?

545


Can you get second highest salary from the table?

555






What is collation sensitivity? Explain different types.

549


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?

591


What are the different types of Indexes available in SQL Server?

521


What command do we use to rename a db, a table and a column?

507


Explain triggers in sql?

558


What do you understand by the data quality services in sql server?

503


What do you mean by acid?

579


Can a unique index be created on a column, which contains null?

525


What are different type of Collation Sensitivity?

556


What is database replication? What are the different types of replication you can set up in sql server?

502