What is the difference between DELETE, TRUNCATE and DROP?

SQL and database basics · Freshers

Model answer

DELETE removes selected rows (with WHERE), can be rolled back in a transaction and fires triggers. TRUNCATE removes all rows quickly and keeps the table structure. DROP removes the whole table, its structure and data. Rollback behaviour of TRUNCATE differs between databases.

Learn this topic

What Is SQL and What Is a Database? in the course SQL for Beginners: Learn Databases Step by Step.

Sign in to add your own answer.

More questions