Type | Keyword | Example |
Referential | REFERENCES | ALTER TABLE dept ADD CONSTRAINT chkmgr FOREIGN KEY(mgr) REFERENCES emp(ename) ON DELETE SET NULL; |
Unique | UNIQUE | ALTER TABLE emp ADD UNIQUE (eno, ename); |
Check | CHECK | ALTER TABLE emp ADD CHECK (salary>0); |
Primary key | PRIMARY KEY | ALTER TABLE emp ADD CONSTRAINT ekey PRIMARY KEY(eno); |