What is the difference between TRUNCATE and DROP TABLE?

SQL Hard
Select the correct answer: Single Choice

Key points

  • TRUNCATE preserves table structure and indexes
  • DROP TABLE removes table definition and data
  • TRUNCATE is used to quickly remove data while keeping the table intact
  • DROP TABLE is used to completely remove the table and its data
  • Understanding the difference is crucial for managing databases effectively

Ready to go further?