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 do you mean by a Composite primary key?

759


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

772


How to create view in stored procedure sql server?

691


Explain what is the difference between a local and a global temporary table?

706


Explain features and concepts of analysis services?

677






Explain syntax for dropping triggers?

701


How to convert character strings into numeric values?

775


what is the difference between a primary key and a unique key? : Sql server database administration

714


Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?

745


Explain powershell included in sql server 2008?

768


How can you append an identity column to a temporary table?

624


Explain unique key in sql server?

722


role of sql sever 2005 in database rather than any other database

1724


How do I change my passwords (database, LDAP, and so on) without causing an outage?

785


can any body tell me how to know the password of current user in sql server

1778