Check Constraint - Definition

Definition

Each check constraint has to be defined in the CREATE TABLE or ALTER TABLE statement using the syntax:

CREATE TABLE table_name ( ..., CONSTRAINT constraint_name CHECK ( predicate ), ... ) ALTER TABLE table_name ADD CONSTRAINT constraint_name CHECK ( predicate )

If the check constraint refers to a single column only, it is possible to specify the constraint as part of the column definition.

CREATE TABLE table_name ( ... column_name type CHECK ( predicate ), ... )

Read more about this topic:  Check Constraint

Famous quotes containing the word definition:

    No man, not even a doctor, ever gives any other definition of what a nurse should be than this—”devoted and obedient.” This definition would do just as well for a porter. It might even do for a horse. It would not do for a policeman.
    Florence Nightingale (1820–1910)

    The very definition of the real becomes: that of which it is possible to give an equivalent reproduction.... The real is not only what can be reproduced, but that which is always already reproduced. The hyperreal.
    Jean Baudrillard (b. 1929)

    The definition of good prose is proper words in their proper places; of good verse, the most proper words in their proper places. The propriety is in either case relative. The words in prose ought to express the intended meaning, and no more; if they attract attention to themselves, it is, in general, a fault.
    Samuel Taylor Coleridge (1772–1834)