SQL Database Concepts Question:

Please differentiate between DELETE and TRUNCATE?

Tweet Share WhatsApp

Answer:

- Truncate can not be rolled back while Delete can be.
- Truncate keeps the lock on table while Delete keeps the lock on each row.
- Truncate resets the counter of the Identity column while Delete doesn't do so.
- Trigger is not fired in Truncate while it happens in Delete.

Download Basic SQL Server PDF Read All 113 Basic SQL Server Questions
Previous QuestionNext Question
Suppose you want to implement the following relationships while designing tables. How would you do it?
a.) One-to-one
b.) One-to-many
c.) Many-to-many
Do you know what are the properties of the Relational tables?