CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE [ IF NOT EXISTS ] table_name ( [
- { column_name data_type [ DEFAULT default_expr ] [ column_constraint [ ... ] ]
+ { column_name data_type [ column_constraint [ ... ] ]
| table_constraint
| LIKE parent_table [ like_option ... ] }
[, ... ]
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE [ IF NOT EXISTS ] table_name
OF type_name [ (
- { column_name WITH OPTIONS [ DEFAULT default_expr ] [ column_constraint [ ... ] ]
+ { column_name WITH OPTIONS [ column_constraint [ ... ] ]
| table_constraint }
[, ... ]
) ]
{ NOT NULL |
NULL |
CHECK ( expression ) |
+ DEFAULT default_expr |
UNIQUE index_parameters |
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
-
- DEFAULT
- default_expr
-
- The DEFAULT> clause assigns a default data value for
- the column whose column definition it appears within. The value
- is any variable-free expression (subqueries and cross-references
- to other columns in the current table are not allowed). The
- data type of the default expression must match the data type of the
- column.
-
-
- The default expression will be used in any insert operation that
- does not specify a value for the column. If there is no default
- for a column, then the default is null.
-
-
-
-
INHERITS ( parent_table [, ... ] )
+
+ DEFAULT
+ default_expr
+
+ The DEFAULT> clause assigns a default data value for
+ the column whose column definition it appears within. The value
+ is any variable-free expression (subqueries and cross-references
+ to other columns in the current table are not allowed). The
+ data type of the default expression must match the data type of the
+ column.
+
+
+ The default expression will be used in any insert operation that
+ does not specify a value for the column. If there is no default
+ for a column, then the default is null.
+
+
+
+
UNIQUE> (column constraint)
UNIQUE ( column_name [, ... ] )> (table constraint)