Differentiate between delete and truncate.



Differentiate between delete and truncate...

Answer / Manish Patel

DELETE removes rows from a table while preserving the table structure and Truncate removes all rows, deallocates space for them, and resets the identity column value.nDELETE is typically slower because it only marks the deleted rows as such, allowing for a potential rollback if needed. Truncate is faster because it skips the rollback process but cannot be rolled back itself.nTruncate also does not log the operation to the transaction log by default, while DELETE does.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

In what sequence sql statement is processed?

1 Answers  


How to connect to a sql server using odbc_connect()?

1 Answers  


What is microsoft sql server?

1 Answers  


What are the extra roles available in msdb? : sql server security

1 Answers  


Describe triggers features and limitations?

1 Answers  


How you can get a list of all the table constraints in a database? : Sql server administration

1 Answers  


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

1 Answers  


Do you know what is difference between stored procedure and user defined function?

1 Answers  


How would you add a section to a table?

1 Answers  


What are difference between Cluster index and Non-Cluster index?

1 Answers   QuestPond,


What is the default port for SQL Server over a firewall?

1 Answers   Microsoft,


Do you know what is bit data type and whats the information that can be stored inside a bit column?

1 Answers  


Categories