Second, use the IF NOT EXISTS option to conditionally create a database if it doesnt exist.If you attempt to create a database with a name that already exists, MySQL will issue an error. The database name must be unique within a MySQL server instance. ![]() First, specify name of the database after the the CREATE DATABASE keywords.To create a new database in MySQL, you use the CREATE DATABASE statement with the following syntax:CREATE DATABASE database_name Code language: SQL (Structured Query Language) (sql) Introduction to the MySQL CREATE DATABASE statement Summary: in this tutorial, you will learn how to use the MySQL CREATE DATABASE statement to create a new database on a MySQL database server.
0 Comments
Leave a Reply. |