Defining Check Constraint

Constraints define the conditions that must be met before values are accepted in the columns of a table.

To define a check constraint

  1. From the Object Explorer, open the table where you want to define a unique constraint. The table appears in the Table Editor document.
  2. Click the Constraints tab.
  3. Click the cell in the empty row of the Type column. A default constraint name appears.
  4. Enter a new name if you want to change the default constraint name.
  5. In the Type column, select Check from the list box.
  6. In the Constraint column, enter the column name and the SQL criteria expression for the CONDITION statement.
  7. Click OK to display the settings on the Constraints page.
  8. Choose Table -> Execute to save your settings to the database.