SQL DROP DATABASE

SQL DROP DATABASE

 SQL DROP DATABASE


Use the DROP statement to delete the database using the MySQL query prompt. This tutorial will help you to delete the MySQL database using the command line.

Syntax:-

DROP database_name;

Example:

Login to your MySQL server using the command line. You will get MySQL database prompts like mysql> . Now use the following command to connect my database.

mysql> DROP mydb;

Another Example:

You can also use the following command directly on the operating system command prompt without logging in to MySQL. This helps users automate tasks inside a script.

mysqladmin -u root -p drop mydb
Reactions

Post a Comment

0 Comments

close