DROP TABLE
Function
This command is used to delete an existing table.
Syntax
DROP TABLE [IF EXISTS] [db_name.]table_name;
Parameter Description
| Parameter | Description |
|---|---|
| db_name | Database name. If this parameter is not specified, the current database is selected. |
| table_name | Name of the table to be deleted |
Precautions
In this command, IF EXISTS and db_name are optional.
Example
DROP TABLE IF EXISTS productDatabase.productSalesTable;
System Response
The table will be deleted.
Last Article: CREATE TABLE As SELECT
Next Article: SHOW TABLES
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.