CREATE DATABASE¶
The CREATE DATABASE
command creates a new database in SQream.
Overview¶
The CREATE DATABASE page describes the following:
Syntax¶
The following is the correct syntax for the CREATE DATABASE command:
create_database_statement ::=
CREATE DATABASE database_name ;
database_name ::= identifier
Parameters¶
The following table shows the CREATE DATABASE parameters:
Parameter |
Description |
---|---|
|
The name of the database name. The database name must be unique, and follows Identifier rules |
Example¶
The following example shows how to use CREATE DATABASE:
CREATE DATABASE raviga;
CREATE DATABASE my_db;
If the database already exists, an error will be displayed:
master=> CREATE DATABASE MY_DB;
Database 'my_db' already exists
Note
SQream identifiers are always converted to lowercase, so my_db
is the same as MY_DB
, unless explicitly quoted as "MY_DB"
.
Permissions¶
Only roles with superuser permissions can create a new database.