Skip to main content
InterviewHubPRO
Section Overview
Q2

Question 2 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

4%
SQL & Relational Databases (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the difference between `DELETE`, `TRUNCATE`, and `DROP`?

junior Levelsql-databasesBasic

In Simple Words:

  • DELETE (DML): Removes rows matching a WHERE condition one by one. Logs each row deletion in transaction logs, fires triggers, and can be rolled back inside a transaction. Slower on large tables.
  • TRUNCATE (DDL): Deallocates entire physical data pages to empty the table. Resets auto-increment counters, does not fire row triggers, and runs significantly faster.
  • DROP (DDL): Completely deletes both the data and the table structure/schema definition from the database catalog.