DROP TABLE Syntax
DROP [TEMPORARY] TABLE [IF EXISTS]
[RESTRICT | CASCADE]
DROP TABLE removes one or more tables. You
must have the
DROP privilege for each table.
All table data and the table definition are
removed, so be careful
with this statement!
Note that for a partitioned table,
permanently removes the table definition, all of its partitions,
and all of the data which was stored in those partitions. It
also removes the partitioning definition
.par) file associated with the dropped
IF EXISTS to prevent an error from
occurring for tables that do not exist. A
NOTE is generated for each non-existent table
IF EXISTS. See
Section 188.8.131.52, “
SHOW WARNINGS Syntax”.
allowed to make porting easier. For the moment, they do nothing.
TABLE automatically commits the current active
transaction, unless you use the
TEMPORARY keyword has the following
The statement drops only
The statement does not end an ongoing transaction.
No access rights are checked. (A
TEMPORARY table is visible only to the
client that created it, so no check is necessary.)
TEMPORARY is a good way to ensure that
you do not accidentally drop a non-