English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Usage and Examples of SQL DATABASE Keyword

SQL Keywords Reference

CREATE DATABASE (Create Database)

The CREATE DATABASE command is used to create a new SQL database.

The following SQL creates a database named "testDB":

CREATE DATABASE testDB;

Tip:Before creating any database, make sure you have administrative privileges. After creating a database, you can use the following SQL command to check it in the list of databases: SHOW DATABASES;

DROP DATABASE (Delete Database)

The DROP DATABASE command is used to delete an existing SQL database.

The following SQL deletes the database named "testDB":

  DROP DATABASE testDB;

Note:Be careful before deleting a database. Deleting a database will result in the loss of all information stored in the database!

SQL Keywords Reference