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

Answer Posted / ranjay

Truncate / When use Truncate after that insert new record
into the table row started from 1 but
Delete / When delete record in a table after that insert
new record row id started from after the deleted row
For e g, I m create a table Employee and insert 5 record
row number set identity true and increment by 1
After that, I m delete last record I e row number is 5
after delete I m insert new record in a table then row id
started from 6 not 5 but when truncate table row id start
from 1

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between clustered index and non clustered index?

624


Explain how to integrate the ssrs reports in application?

518


What is the Control Flow in SSIS

572


what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration

563


What is a cache in ssrs?

110






What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas

698


How can I know what locks are running on which resource?

503


How to apply cascading referential integrity in place of triggers?

568


What is difference between table aliases and column aliases? Do they affect performance?

505


What are the functions in sql server?

541


How to turn on the mssql api module in php?

561


How to drop an existing schema in ms sql server?

591


mention different types of relationships in the dbms?

503


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

647


What is difference between index and primary key?

582