What is the difference between TRUNCATE and DELETE when removing all rows?

SQL Data Analyst Medium

SQL Data Analyst — Medium

What is the difference between TRUNCATE and DELETE when removing all rows?

Key points

  • TRUNCATE is DDL, DELETE is DML
  • TRUNCATE resets identity columns
  • DELETE logs every row individually

Ready to go further?

Related questions