Home > Article > Daily Programming > Syntax to delete database in mysql
MySQL database deletion syntax: DROP DATABASE database_name; Specific steps: Open the MySQL command line or workbench. Use the USE statement to switch to the database to be dropped. Execute the DROP DATABASE statement.
Syntax for deleting a database in MySQL
To delete a database in MySQL, you can use the following syntax:
<code>DROP DATABASE database_name;</code>
Where, database_name
is the name of the database to be deleted.
Specific steps:
Use the USE
statement to switch to the database to be deleted:
<code>USE database_name;</code>
Execute the DROP DATABASE
statement:
<code>DROP DATABASE database_name;</code>
Note:
DROP DATABASE
statement, you must first switch to the database to be deleted . Otherwise, MySQL issues an error. SUPER
or DROP
permissions can delete the database. The above is the detailed content of Syntax to delete database in mysql. For more information, please follow other related articles on the PHP Chinese website!