What is the difference between truncate and delete statement?

Answer Posted / vasu

Both Truncate and delete deletes the rows from a table .
But we cant use where clause in truncate statement . While
doing delete operation all the deleted rows are logged in
the transaction log . It reduces the perfomance . In
truncate operation no transaction logging is happening .
Delete is Autocommited but Truncate is Not .

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1210


Delete duplicate rows without using rowid.

1075


Do you know what are the differences between lost updates and uncommitted dependencies?

547


What is the difference between join and inner join?

541


Define model database?

577






How to invoke a trigger on demand?

547


What is a periodical index?

510


How to set the current database in ms sql server?

534


What is tablix?

115


Which data type columns are the best candidates for full-text indexing?

604


How to use clusters?

555


What is used to replicate sessions between instances in coldfusion clusters?

588


What are the differences between triggers and stored procedures?

539


What is the purpose of update statistics and scope_identity() function?

602


How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication

556