DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back.
- General Questions
- Technical Questions
- Project Management Questions
- Job Interview Puzzles
- Interview Advice
More links from same category
- What does NULL mean?
- Can you tell me what is Transaction?
- Can you tell me what is SQL state database?
- Explain Externalizable interface?
- Explain the advantages of ASP.NET MVC?
- What is preinitialization of a servlet?
- Merging Arrays Interview Question
- Can a ArrayList contain heterogenous objects?
- Please explain DTS?
- Descrbe a regular expression which matches email address
- How do you get the line numbers in C?