:: DEVELOPER ZONE
DROP [TEMPORARY] TABLE [IF EXISTS]
tbl_name [, tbl_name] ...
[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!
In MySQL 3.22 or later, you can use the keywords IF
EXISTS to prevent an error from occurring for tables that
don't exist. As of MySQL 4.1, a NOTE is generated
for each non-existent table when using IF EXISTS.
See Section 13.5.4.20, “SHOW WARNINGS Syntax”.
RESTRICT and CASCADE are
allowed to make porting easier. For the moment, they do nothing.
Note: DROP TABLE
automatically commits the current active transaction, unless you are
using MySQL 4.1 or higher and the TEMPORARY
keyword.
The TEMPORARY keyword is ignored in MySQL 4.0. As
of 4.1, it has the following effect:
The statement drops only TEMPORARY tables.
The statement doesn't end a running transaction.
No access rights are checked. (A TEMPORARY table
is visible only to the client that created it, so no check is
necessary.)
Using TEMPORARY is a good way to ensure that you
don't accidentally drop a non-TEMPORARY table.
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.