The command to delete a database in MySQL is DROP DATABASE, and the syntax is: DROP DATABASE database_name; Its usage is: connect to the server, specify database_name and run this command to delete the database.
The command to delete a database in MySQL
The command to delete a MySQL database isDROP DATABASE
. Next, its syntax and usage are introduced in detail:
Syntax:
<code class="sql">DROP DATABASE database_name;</code>
Parameters:
database_name
: The name of the database to be deleted. Usage:
To delete a database using the DROP DATABASE
command, follow these steps:
DROP DATABASE
command and specify the name of the database to be deleted. For example:
<code class="sql">DROP DATABASE my_database;</code>
This command will delete the database named my_database
.
Note:
DROP DATABASE
command as it will permanently delete the database and all its contents . DROP TABLE
command. DROP
permission can delete the database. The above is the detailed content of Command to delete database in mysql. For more information, please follow other related articles on the PHP Chinese website!