Tutorials

SQL Database


SQL Drop Database


 

DROP DATABASE statement in SQL is used to drop the existing database

Syntax for Drop Database


DROP DATABASE db_name;

Example

In last chapter, we created a database with name 'tih_database' and within we said we have a table "tih_courses".

Suppose we don't require this database now. So we can drop it as shown below:


DROP DATABASE tih_database;

Executing the above SQL query will drop the database tih_database.

Similarly you can drop any database in SQL.

 

Important points to remember before you use DROP

  • When you drop a database then you are destroying the complete existence of that particular database. So you cannot recall, reuse the database or any table, view, trigger which was part of that particular database. So use DROP with full care.


Please Share this page
Views : 119
Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!