Syntax:
CREATE DATABASE dbname
[ IN dbspace ]
[ { WITH [ LOCATION = 'dbpath' ] [ TEMPLATE = template ] [ ENCODING = encoding ] }
| { WITH [ BUFFERED ] LOG }
| { WITH LOG MODE ANSI } ]
Beschreibung:
Erstellt eine neue Datenbank. Achtung, die Syntax und die Zusatzoptionen variieren sehr stark in Abhängigkeit vom verwendetem Datenbanksystem.
Beispiel (allgemein):
CREATE DATABASE example;
Erstelle eine neue Datenbank example.
Beispiel (Postgresql):
CREATE DATABASE expamle WITH LOCATION = '/var/lib/postgresql/data' ENCODING='utf-8'
Erstelle eine neue Datenbank example mit Datenbankzeichensatz utf-8, welche physisch im Verzeichnis '/var/lib/postgresql/data' gespeichert ist.
Beispiel (Informix):
CREATE DATABASE expamle IN dbsl01 WITH BUFFERED LOG;
Erstelle im DB-Slice dbsl01 eine neue Datenbank example mit gepuffertem Logging.