mysql

Create and select database MySQL

CREATE DATABASE query is used to create a new database in MySQL and to use an existing database in MySQL 'USE database_name;' query is used.

-- To create database
CREATE DATABASE db_name;

--To select database
USE db_name;

To delete an existing database from MySQL use DROP query as below

DROP DATABASE db_name;

 LIst all database exists in MySQL

SHOW DATABASES;
Was this helpful?