MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL Create Database

The CREATE DATABASE statement is creates a database with the given name. To use this statement, you need the CREATE privilege for the database. An error occurs if the database already exists and you did not specify IF NOT EXISTS.

Syntax

CREATE DATABASE databasename;

CREATE DATABASE Example

The following MySQL statement creates a database called "myDB":

Example

CREATE DATABASE myDB;

You can use MySQL Command Line Client to create database. It will look like this:

Note: In order to create database, you must have admin privilege. All the database names, table names and table fields name are case sensitive. You must have to use proper names while giving any SQL command.

Show DATABASES Example

You can check the created database by the following query:

Example

SHOW DATABASES;

You can use MySQL Command Line Client to show databases. It will look like this: