SQL > Data Definition Language (DDL) > Drop Database Statement

Sometimes we may decide that we need to delete of an entire database in the RDBMS. In fact, if we cannot do so, we would be faced with a maintenance nightmare. Fortunately, SQL allows us to do it, as we can use the DROP DATABASE command.

Syntax

The syntax for DROP DATABASE is,

DROP DATABASE "database_name";

Example

To drop the HOLIDAYS database that we created in the CREATE DATABASE section, we type,

DROP DATABASE HOLIDAYS;

Please note that any table that is still in the database will also disappear once the database is dropped.

Next: SQL GRANT

This page was last updated on October 11, 2024.




Copyright © 2024   1keydata.com   All Rights Reserved     Privacy Policy     About   Contact