Creating Database in Mysql

Before creating tables in mysql, we have to create database.
command to create database

Command:-

CREATE DATABASE database_name;

Example:-

CREATE DATABASE naikgroup;

To use/choose/enter the database follow this command.

Command:-

USE database_name;

Example:-

USE naikgroup;

Here Naikgroup is database name.

Get list of database in mysql use this command

Syntax:-

SHOW DATABASES;

Note:-

# We can use any word as database name.
# Database name can be combination of Character and number but not number only.
# Number can be used as 1st digit in database name.

List Code:-
Mysql Codes

Next Code:-
Delete Database

Leave reply

Add your comments here

Back to Top