What statements are used to create a database in MySQL?
To create a database in MySQL, you can use the CREATE DATABASE
statement.
Syntax
<code>CREATE DATABASE database_name;</code>
Parameters
database_name
: The name of the database to be created (identifier). Example
To create a database named "mydb", you can use the following statement:
<code>CREATE DATABASE mydb;</code>
After executing this statement, The "mydb" database will be created.
Note
CREATE DATABASE
statement can only be executed by a user with appropriate permissions, such as the CREATE
permission. The above is the detailed content of What statement is used to create a database in mysql. For more information, please follow other related articles on the PHP Chinese website!