Drop Table

Download mysql eBook

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.

Related Examples

Stats

110 Contributors: 8
Tuesday, January 31, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook