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:

    According to our social pyramid, all men who feel displaced racially, culturally, and/or because of economic hardships will turn on those whom they feel they can order and humiliate, usually women, children, and animals—just as they have been ordered and humiliated by those privileged few who are in power. However, this definition does not explain why there are privileged men who behave this way toward women.
    Ana Castillo (b. 1953)

    The physicians say, they are not materialists; but they are:MSpirit is matter reduced to an extreme thinness: O so thin!—But the definition of spiritual should be, that which is its own evidence. What notions do they attach to love! what to religion! One would not willingly pronounce these words in their hearing, and give them the occasion to profane them.
    Ralph Waldo Emerson (1803–1882)

    Mothers often are too easily intimidated by their children’s negative reactions...When the child cries or is unhappy, the mother reads this as meaning that she is a failure. This is why it is so important for a mother to know...that the process of growing up involves by definition things that her child is not going to like. Her job is not to create a bed of roses, but to help him learn how to pick his way through the thorns.
    Elaine Heffner (20th century)