To drop (delete) a table in MySQL, you can use the DROP TABLE statement.
Syntax:
DROP TABLE [IF EXISTS] table_name;
- table_name: The name of the table you want to drop.
- IF EXISTS: An optional clause that prevents an error from occurring if the table does not exist.
Example:
DROP TABLE IF EXISTS employees;
This statement will drop the table named employees if it exists.
Important: Be very careful when using the DROP TABLE statement, as it permanently removes the table and all its data.