MySql "CREATE DATABASE" query syntax with example

In this article we will see "How to create a Database in MySql" and "MySql CREATE DATABASE query syntax with example".

"CREATE DATABASE" query syntax

"CREATE DATABASE" is used to create new database in MySql, the syntax is as follow.


CREATE DATABASE databasename;

"CREATE DATABASE" query example

"CREATE DATABASE" is used to create new database in MySql, as shown in the example below.


CREATE DATABASE testDatabase;

Here "testDatabase" is the name of newly created database.

In this article we have seen"How to create a Database in MySql", in upcoming articles we will see more about Mysql syntax and queries with example.

About The Author

Nagesh Chauhan

Nagesh Chauhan has 8+ years of software design and development experience in variety of technologies like - Core Java, Java 8 (Streams, Lambda), J2EE (Servlet, JSP), Spring Framework (MVC, IOC, JDBC, SECURITY etc), Spring Boot and Microservices, Kafla, Redis, Cassandra and Spark.