What is the difference between truncate and delete statement?

Answer Posted / balaji t

Identity counter can be reset in truncate whereas it is not possible in delete.Truncate dont activate trigger whereas delete can be used in triggers.truncate is a DDL command whereas delete is a DML command.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the most common trace flags used with sql server?

524


What is user-defined inline table-valued function?

521


How do you identify a foreign key?

607


What is NOT NULL Constraint in sql server 2012?

605


Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?

630






Mention what are the different types of ssrs reports?

98


where can you add custom error messages to sql server? : Sql server administration

585


What are the ways available in sql server to execute sql statements?

574


Tell me in brief how sql server enhances scalability of the database system?

536


How many levels of sp nesting are possible?

557


Why should you use or avoid select * statements?

579


What command would you use to create an index?

596


what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration

542


Tell me what are the essential components of sql server service broker?

512


Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

644