MySQL Drop Table

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Syntax

  • DROP TABLE table_name;
  • DROP TABLE IF EXISTS table_name; -- to avoid pesky error in automated script
  • DROP TABLE t1, t2, t3; -- DROP multiple tables
  • DROP TEMPORARY TABLE t; -- DROP a table from CREATE TEMPORARY TABLE ...

Parameters

ParametersDetails
TEMPORARYOptional. It specifies that only temporary tables should be dropped by the DROP TABLE statement.
IF EXISTSOptional. If specified, the DROP TABLE statement will not raise an error if one of the tables does not exist.


Got any MySQL Question?