Popular Tutorials
HTML
View allJavaScript
View allMySQL Create Command
MySQL implements a database as a directory that stores all files in the form of a table. It allows us to create a database mainly in two ways:
MySQL Command Line Client
MySQL Workbench
MySQL Command Line Client
We can create a new database in MySQL by using the CREATE DATABASE statement with the below syntax:
CREATE DATABASE [IF NOT EXISTS] database_name [CHARACTER SET charset_name] [COLLATE collation_name];
The parameter descriptions of the above syntax are as follows:
database_name It is the name of a new database that should be unique in the MySQL server instance. The IF NOT EXIST clause avoids an error when we create a database that already exists.
charset_name It is optional. It is the name of the character set to store every character in a string. MySQL database server supports many character sets. If we do not provide this in the statement, MySQL takes the default character set.
collation_name It is optional that compares characters in a particular character set.
Let's move on to Select database command in MySQL
Share this page on :
© 2022 AnalyzeCode.com All rights reserved.