SQL DROP Database

This statement is used to Delete all Structure/Data in database.

Syntax:

DROP database "DatabaseName";

Example: Below query will delete Structure/Data from the database. To DROP the database in “CREATE database tutorialmines” with the name “tutorialmines”. Use the below command

DROP DATABASE tutorialmines;

Note : Your user should have admin privileges to run this command.

To Check for your database in sql whether it has been deleted or not,  use the below command :

SHOW Databases;

It will list all the databases in your sql.

+———————————–+
| Database |
+———————————–+
| information_schema |
| cdcol |
| contact_all |
| dreammarine_live |
| mysql |
| performance_schema |
| phpmyadmin |
| webauth |
+———————————–+
8 rows in set (0.00 sec)

Why there is a need to DROP Database ?

  • To create the space in your system, to avoid low space issue in your system.
  • It avoids system maintenance issues.

Now lets move to next step of  How to CREATE a table.

You may also like...

Leave a Reply

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