How to create a CHECK constraint on an existing table (Enterprise Manager)
To create a CHECK constraint on an existing table
- Expand a server group; then expand a server.
- Expand Databases, expand the database in which the table belongs, and then click Tables.
- In the details pane, right-click the table, and then click Design Table.
- Right-click the column name on which to create the CHECK constraint; then click Properties.
- On the Tables tab, click New.
- In Constraint expression, enter the text of the constraint.
- Optionally:
- In Constraint name, enter a name for the constraint if different from the default name supplied.
- Select Check existing data on creation to apply the new CHECK constraint to existing data in the column(s).
- Clear Enable constraint for INSERT and UPDATE to disable the constraint when new data is added to the table or when existing data is updated in the table.
- Clear Enable constraint for replication to disable the constraint when the table is replicated in another database
See Also
Creating and Modifying CHECK Constraints
(c) 1988-98 Microsoft Corporation. All Rights Reserved.