Поделиться через


How to: Delete Check Constraints

Delete a check constraint when you want to remove the limitations on data values that are accepted in the column or columns included in the constraint expression.

Note

Some databases have different functionality for check constraints. Consult your database documentation for details about how your database works with check constraints.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To delete a check constraint

  1. In Server Explorer, select the table with the check constraint, and from the Database menu click Open Table Definition.

  2. The table opens in Table Designer.

  3. From the Table Designer menu, click Check Constraints.

  4. In the Check Constraints dialog box, select the constraint in the Selected Check Constraint list.

  5. Click the Delete button.

Note

To undo this action, close the table without saving the changes. Choosing Delete cannot be undone without losing all other changes made to the database diagram.

The constraint is deleted from the database when you save the table.

See Also

Reference

Indexes/Keys Dialog Box

Other Resources

Working with Constraints

Working with Keys