You have the option to specify:
- A default value for the column.
- Integrity constraints. Constraints can be applied to a set of columns (a table-level constraint), or to a single column (a column-level constraint). Integrity constraints include:
PRIMARY KEYcolumn constraint, if the column is a
PRIMARY KEY, and the
PRIMARY KEYconstraint is not defined at the table level. Creating a
PRIMARY KEYrequires exclusive database access.
UNIQUEconstraint, if the column is not a
PRIMARY KEY, but should still disallow duplicate and
FOREIGN KEYconstraint, if the column references a
PRIMARY KEYin another table. Creating a
FOREIGN KEYrequires exclusive database access. The foreign key constraint includes the
ON DELETEmechanisms for specifying what happens to the foreign key when the primary key is updated (cascading referential integrity).
NOT NULLattribute does not allow
NULLvalues. This attribute is required if the column is a
CHECKconstraint for the column. A
CHECKconstraint enforces a condition that must be true before an insert or an update to a column or group of columns is allowed.
CHARACTER SETcan be specified for a single column when you define the data type. If you do not specify a character set, the column assumes the database character set as a default.