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:

    It’s a rare parent who can see his or her child clearly and objectively. At a school board meeting I attended . . . the only definition of a gifted child on which everyone in the audience could agree was “mine.”
    Jane Adams (20th century)

    One definition of man is “an intelligence served by organs.”
    Ralph Waldo Emerson (1803–1882)

    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)