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
- Can you tell me what is Dynamic CSS?
- What is an index? What types of indexes are available in SQL Server 2000?
- What is a syntax for connection string to connect to a SQL Server Express database using Silverlight ?
- Explain a primary key? Explain a foreign key?
- Pair Programming Exercise: Write a command line calculator
- What is the basic difference between Publish Subscribe model and P2P model?
- Can I import same package/class twice? Will the JVM load the package twice at runtime?
- Find substring in a string