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 are the aggregate and scalar functions?

760


What is rolap and its advantage? : sql server analysis services, ssas

984


What is scrollable cursor?

784


How to create a new login name in ms sql server?

737


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

776


What is the exact numeric data type in sql?

774


What is system stored procedures?

786


what is checksum in sql server.........???

1408


What is save transaction and save point?

872


Define Unique Key?

783


How to find out the list schema name and table name for the database?

729


can a table be moved to different filegroup? : Sql server administration

744


What is difference between joins and subqueries?

803


Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?

857


i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.

1619