Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

DATABASE

CREATE DATABASE

The CREATE DATABASE command is utilized to establish a new SQL database.

The provided SQL creates a database named “testDB”.

Example

CREATE DATABASE testDB;
Tip: Ensure you possess administrative privileges before creating any database. Once a database is created, you can verify its presence in the database list using the following SQL command: SHOW DATABASES;

DROP DATABASE

The DROP DATABASE command is utilized to remove an existing SQL database.

The provided SQL drops a database named “testDB”.

Example

DROP DATABASE testDB; 
Note: Exercise caution before dropping a database. Deleting a database will lead to the loss of all information stored within it!