SQL DDL

What
The SQL data definition language allows us to define tables and their constraints.

Format
CREATE TABLE table_name ( {column_name data_type}  [DEFAULT default_expr]  [column_constraint [, ...]]|  table_constraint} [,...] )

Column Constraints
All of the following are valid column constraints
 * {NOT NULL | NULL | UNIQUE | PRIMARY KEY}
 * CHECK(expression)
 * REFERENCES reftable [( refcolumn)][ON DELETE action][ON UPDATE action]}

Table Constraints
[CONSTRAINT constraint_name] { UNIQUE (column_name [, ...])| PRIMARY KEY (column_name [, ...])| CHECK (expression)| FOREIGN KEY (column_name [, ...]) REFERENCES reftable [(refcolumn[,...])][ON DELETE action][ON UPDATE action] }