Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to: Modify Check Constraints (Visual Database Tools)

Modify a check constraint when you want to change the constraint expression or the options that enable or disable the constraint for specific conditions. For information about how to define the correct syntax for a constraint, see How to: Define Check Constraint Expressions (Visual Database Tools).

To modify a check constraint

  1. In your database diagram, right-click the table containing the constraint, then select Properties from the shortcut menu.


    Open the Table Designer for the table containing the constraint, right-click in the Table Designer, and choose Check Constraints from the shortcut menu.

  2. Choose the Check Constraints tab.

  3. Select the constraint you want to change from the Selected Check Constraint list.

  4. Complete an action from the following table:


    Some databases have different functionality for check constraints.


    Follow these steps

    Edit the constraint expression

    Type the new expression in the Expression field.

    Rename the constraint

    Type a new name in the Name field.

    Apply the constraint to existing data

    Select the Check Existing Data on Creation or Enabling option.

    Disable the constraint when new data is added to the table or when existing data is updated in the table.

    Clear the Enforce Constraint for INSERTs and UPDATEs option.

    Disable the constraint when a replication agent inserts or updates data in your table. For more information, see Controlling Constraints, Identities, and Triggers with NOT FOR REPLICATION.

    Clear the Enforce For Replication option.

The constraint is updated in the database when you save your table or diagram.

Community Additions

© 2015 Microsoft