SQL DROP DATABASE IF EXISTS
To avoid any error while running the DROP DATABASE command use the IF EXISTS clause, which will delete the database only if it exists in the system.
Syntax
DROP DATABASE IF EXISTS Database_Name;
SQL DROP DATABASE
SQL DROP DATABASE statement deletes an existing database from the system, and once deleted, users can not retrieve that database.
The DROP DATABASE command in SQL deletes the database along with its data, like tables, views, indexes, constraints, and properties like permissions and schemas.