Database

CREATE DATABASE database_name;

To create a new database, you use the CREATE DATABASE statement.

Select

USE database_name;  -- MySQL and MariaDB

Before performing operations on tables or other objects within a database, you need to select it.

Drop

DROP DATABASE database_name;

If you need to delete a database, you can use the DROP DATABASE statement. This operation is irreversible and will permanently remove the database along with all its objects.

View

SHOW DATABASES;  -- MySQL and MariaDB

In this way you can view a list of all databases in your SQL environment.

Database — Structure map

Clickable & Draggable!

Database — Related pages: