[prev] [index] [next]

Constraints

So far, we have considered several kinds of constraints:
  • attribute (column) constraints
  • relation (table) constraints
  • referential integrity constraints
Examples:

create table Employee (
   id      integer primary key,
   name    varchar(40),
   salary  real,
   age     integer check (age > 15),
   worksIn integer
              references Department(id),
   constraint PayOk check (salary > age*1000)
);