Creates a new database.
Syntax
CREATE DATABASE nameParameters
| Parameter | Description |
| name | The name of the new database. |
Description
The CREATE DATABASE command creates a new database.
Note
- Only superusers or users with the polar_superuser or createdb permission can create databases.
- Non-superusers with the createdb permission can only create databases that they own.
- The CREATE DATABASE command cannot be executed inside a transaction block.
- Sufficient disk space is required to create a new database.
Example
CREATE DATABASE testdb;该文章对您有帮助吗?