How to create a CHECK constraint when creating a table (Enterprise Manager)
To create a CHECK constraint when creating a table
- Expand a server group; then expand a server.
- Expand Databases; then expand the database in which to create the table.
- Right-click Tables; then click New Table....
- In the Choose Name dialog box, enter a name for the table.
- Fill in the columns as appropriate. Each row represents one column in the table.
- Right-click the column name on which to create the CHECK constraint, and 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.