MySQL Drop Table

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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?