Advertisement

Google Ad Slot: content-top

MySQL Drop DB


MySQL DROP DATABASE Statement


The DROP DATABASE statement in MySQL is used to permanently delete a database, along with all its tables, indexes, and data. This action CANNOT be undone, so use it with caution.


Syntax:


DROP DATABASE database_name;


  • database_name is the name of the database you want to delete.



Warning

Be careful before dropping a database. Deleting a database will result in loss of complete information stored in the database!

Example: Deleting a Database
DROP DATABASE school_db;
  • This command removes school_db completely from MySQL.

Note

✔ Always back up important data before running DROP DATABASE.

✔ Double-check the database name to avoid accidental deletion.

✔ SHOW DATABASES helps verify before and after deletion.