Create new DB In MySQL

Syntax for create data base in MySQL server

create database <database_name>;

SQL Command for create data base in MySQL server

 CREATE DATABASE demo;

Syntax for create data base in MySQL server with character set

create database <database_name> character set <character_set_name> collacte <collacte_name>;

 CREATE DATABASE demo CHARACTER SET utf8 COLLATE utf8_general_ci;

Run the below comment to know the list of data bases

SHOW DATABASES; 
USE `demo`;   // for make demo db for useable. for if you run any statement that will be apply in demo db; 

Leave a Reply

Your email address will not be published. Required fields are marked *