MySQL Drop TABLE statement remove the existing table from database. The DROP TABLE statement not only removes a table but also remove its structure and data permanently from the database. In MySQL, you can remove multiple tables using a single DROP TABLE statement, each table is separated by a comma (,).
To remove existing table, use the following syntax:
Parameters:
oldtablename: The old table name that you want to rename.
newtablename: The new table name for the existing table.
[TEMPORARY]: The TEMPORARY flag allows you to remove temporary tables only.
[IF EXISTS]: The IF EXISTS helps you to prevent from removing non-existent tables.
Note:
In the above example, we removed the existing table "tblCustomer" from database.
You can use MySQL Command Line Client to remove existing table. It will look like this:
You can use MySQL Command Line Client to show renamed table name. It will look like this: