Turning on constraint checking for a table and checking the data

Use the Set Integrity window to turn on constraint checking for a table and check the existing table data. You can also force identity or generated columns to be populated during the constraint check. The table cannot be a system table.

Normally, referential integrity and check constraints on a table are automatically enforced. In some situations, you might need to manually turn on constraint checking for a table.

Attention: If the selected table has a cyclical referential constraint relationship with one or more tables, you cannot use the Set Integrity window to turn on constraint checking. In this case, you must use the Command Center to issue the SQL SET CONSTRAINTS command. (For information on the syntax of the SET CONSTRAINTS command, see the SQL Reference .)

Fields and controls

Authorities and privileges



To turn on constraint checking for a table and check the existing table data:

  1. Open the Set Integrity window.
  2. Select the On with checking radio button.
  3. Optional: If you want identity or generated columns to be populated during the constraint checking, select the Force generated check box.

    If you want to specify how many identity or generated rows are populated before a COMMIT is issued, select the Commit threshold checkbox, and specify the number of rows that you want.

  4. Optional: Specify an exception table by using the Exception table schema and Exception table name fields. Any row that is in violation of a referential or check constraint will be deleted from your table and copied to the exception table.

    If you do not specify an exception table, when a constraint is violated, only the first violation detected is returned to you and the table is left in the check pending state.

  5. Click on OK to turn on constraint checking for this table and check the table data.


Related information



Troubleshooting tips