Menu

SQL query for create a database


To create a database the CREATE DATABASE statement is used .

To create a table in database first we have to need create a database.

SQL CREATE DATABASE Syntax

CREATE DATABASE dbname;

Here dbname specifies the database name.

Example

The following SQL statement creates a database called "student _db":

CREATE DATABASE sudent_db;







Connection failed: SQLSTATE[28000] [1045] Access denied for user 'studentdb'@'localhost' (using password: YES)

Subscribe