SQL Constraints
Jump to navigation
Jump to search
Internal
Overview
NOT NULL Constraint
CREATE TABLE ...
( ...
somecolumn varchar(30) NOT NULL,
...
);
Also see:
Primary Key Constraint
CREATE TABLE ...
( ...
CONSTRAINT pk_someconstraint PRIMARY KEY (somecolumn)
);
Check Constraint
CREATE TABLE ...
( ...
eye_color CHAR(2) CHECK (eye_color IN ('BR', 'BL', 'GR')),
...
);