Updated on 2024-09-06 GMT+08:00

CREATE DATABASE Options

When creating databases, you can specify a template database and set different character sets and collations for each database.

This section describes how to use the CREATE DATABASE command to configure the template database, character set, LC_COLLATE, and LC_CTYPE. For details about other parameters, see the official documentation.
CREATE DATABASE name    
[ [ WITH ] [ OWNER [=] user_name ]           
       [ TEMPLATE [=] template ]           
       [ ENCODING [=] encoding ]           
       [ LC_COLLATE [=] lc_collate ]           
       [ LC_CTYPE [=] lc_ctype ]           
       [ TABLESPACE [=] tablespace_name ]          
       [ ALLOW_CONNECTIONS [=] allowconn ]           
       [ CONNECTION LIMIT [=] connlimit ]          
       [ IS_TEMPLATE [=] istemplate ] ]