Delete table command in MySQL: DROP TABLE. Syntax: DROP TABLE table_name. Usage: 1. Connect to the database; 2. Enter the command: DROP TABLE table_name; 3. Execute the command. Note: The data in the table needs to be deleted before deletion; the data will be permanently lost after deletion; foreign key constraints need to be deleted or modified first; make sure you have the permission to delete the table.
Command to delete a table in MySQL
DROP TABLE command is used to delete a table from a MySQL database Delete a table in .
Syntax:
<code>DROP TABLE table_name;</code>
Among them:
table_name
is the table to be deleted name. Usage:
To delete a table, follow these steps:
table_name
is replaced with the name of the table to be deleted: <code>DROP TABLE table_name;</code>
Enter
to execute Order. Note:
The above is the detailed content of Command to delete a table in mysql. For more information, please follow other related articles on the PHP Chinese website!