How to drop (delete) a table

A statement that drops a table

      DROP TABLE customers; 
      

A statement that drops a table if it exists

      DROP TABLE IF EXISTS customers;
      

A statement that empties a table

Use the TRUNCATE TABLE statement to empty a table of all of its records but retain the table structure.

      TRUNCATE TABLE customers;
      

Description

Warning

Back