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.


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.