You are here

Neuen Kommentar schreiben

CREATE DATABASE

Syntax:


    CREATE DATABASE dbname
    [ IN dbspace ]
    [ { WITH [ LOCATION = 'dbpath' ] [ TEMPLATE = template ] [ ENCODING = encoding ] }
    | { WITH [ BUFFERED ] LOG }
    | { WITH LOG MODE ANSI } ]

Description:

    Creates a new database in the database management system. Attention, the syntax and the options vary from database system to database system.

    Example (common):

CREATE DATABASE example;

Creates a new database with name example.

Example (Postgresql):

CREATE DATABASE expamle WITH LOCATION = '/var/lib/postgresql/data' ENCODING='utf-8'

Creates a new database examle, which uses utf-8 as character encoding and is phisically stored in
'/var/lib/postgresql/data'.

Example (Informix):

CREATE DATABASE expamle IN dbsl01 WITH BUFFERED LOG;

Creates in DB-Slice dbsl01 a new database example with buffered logging turned on.

Categories: