What is difference between TRUNCATE and DELETE statement

Answer Posted / nageswarao

truncate is used for deleting all data from table.
it is similar to delete command without condition.
main differences b/w delete & truncate are
1.truncate is faster in execution than delete which will
restructure the complete table without bothering of data.
where as delete checks the data row by row wrotes
information into log and deletes.
2.with truncate we cannot use any conditions

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is constraints and its types?

503


What is a field name?

515


What is @@error in sql?

624


How does index makes search faster?

605


How to remove duplicate rows from table except one?

576






how we use window authentication connection with sql server.?

632


What can be used instead of trigger?

630


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

527


How do I start sql server?

533


Explain the rules for designing files and file groups in sql server?

552


How to identify current user in ssrs report?

242


How to find the source of a table in sql server?

529


What is self contained multi valued query?

560


what is the difference between openrowset and openquery?

589


How many clustered indexes there can be on table ?

603