CREATE TABLE
Creates a new table object in the database.
Syntax
CREATE [
TEMP]
TABLE [
IF NOT EXISTS ]
table-specification
(
[
column-name data-type
[
DEFAULT default-value ]
[
NOT NULL ]
[
PRIMARY KEY [
contraint-name ]
|
UNIQUE [
contraint-name ]
|
CHECK ( sql-condition ) [
contraint-name ]
|
REFERENCES table-name
[
( column-name [
,...]
) ]
[
ON DELETE CASCADE ]
[
contraint-name ]
]
|
PRIMARY KEY ( column-name [
,...]
) [
contraint-name ]
|
UNIQUE ( column-name [
,...]
) [
contraint-name ]
|
CHECK ( sql-condition ) [
contraint-name ]
|
FOREIGN KEY ( column-name [
,...]
)
REFERENCES table-name
[
( column-name [
,...]
) ]
[
ON DELETE CASCADE ]
[
contraint-name ]
]
[
,...]
)
[
WITH NO LOG ]
[
IN tablespace-name ]
[
EXTENT SIZE integer ]
[
NEXT SIZE integer ]
[
LOCK MODE {
PAGE |
ROW }
]