MySQL DROP DATABASE

DROP DATABASE syntax

Below is the Syntax for dropping/deleting a Database in MySQL

Where DataBaseName is the name of the Database which you would like to drop

DROP DATABASE Example

To Demonstrate DROP DATABASE command, let us first create a DemoDataBase by executing the following script

Let us verify whether the above statement has created the DemoDataBase Database in MySQL by executing the following script

RESULT:
mysql-show-databases-after-create-database

From the above result we can see that the DemoDataBase is created in MySQL

Let us now drop the above created database by executing the following script

RESULT:
mysql-show-databases-after-drop-database

From the above result we can see that now the DemoDataBase no-longer exists in MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *