This statement is used to delete tables.
1 | DROP TABLE [IF EXISTS] [db_name.]table_name; |
Parameter |
Description |
---|---|
db_name |
Database name, which consists of letters, digits, and underscores (_). The value cannot contain only digits or start with a digit or underscore (_). |
table_name |
Table name |
The to-be-deleted table must exist in the current database. Otherwise, an error is reported. To avoid this error, add IF EXISTS to this statement.
1 | DROP TABLE IF EXISTS test; |