Create Database Command in MySQL
In this article, we will see how to create a database command in MySQL.
To store and process data of a business, a company, an organization, etc.; the first step is to create a database for it.
To create a database in MySQL server; we take the help of creating the database :
create database [ if not exists ] databasename;
create database if not exists db_wonderdevelop;
While creating a database; if you don’t specify if not exists clause & the database you want to create already exists in the server then an error is thrown.
While creating a database; if you don’t know whether the database that you want to create already exists in the server or not then you must specify the if not exists clause.
While creating a database; if you know that the database that you want to create does not already exist in the server then you need not specify not exist clause.