CREATE TABLE — Define a new table.
CREATE TABLE
CREATE [ GLOBAL TEMPORARY | UNLOGGED ] TABLE <table_name> ( { <column_name> <data_type> [ DEFAULT <default_expr> ] [ <column_constraint> [ ... ] ] | <table_constraint> } [, ...] ) [ WITH ( ROWIDS [= <value> ] ) ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS } ] [ TABLESPACE <tablespace> ] { NOPARALLEL | PARALLEL [ <integer> ] }
Where column_constraint is:
column_constraint
[ CONSTRAINT <constraint_name> ] { NOT NULL | NULL | UNIQUE [ USING INDEX TABLESPACE <tablespace> ] | PRIMARY KEY [ USING INDEX TABLESPACE <tablespace> ] | CHECK (<expression>) | REFERENCES <reftable> [ ( <refcolumn> ) ] [ ON DELETE <action> ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
Where table_constraint is:
table_constraint