Please enable JavaScript to view this site.

Altova DatabaseSpy 2020 Professional Edition

A check constraint is used to define a range of values that are accepted by a column. It uses a logical expression to determine the acceptable values. Check constraints can be defined on table level (i.e., several columns of a table are checked in the expression) or on a single column. Multiple check constraints can be applied to a single column.


Check constraints on table level are shown with an ic_check-constraint icon when you expand the Check Constraints section of a table design. They are displayed together with the expression(s) that are used to validate the table.


Check constraints on table level can be renamed and their expressions can be modified directly in the table design.


A check constraint on column level is indicated by the check column ic_check-column icon being displayed with the column the check constraint is defined for in the Columns section of the table design. Please note that this icon is not displayed if either a primary key, unique key, or foreign key is defined for this column, or if the column is of type XML, since all these qualities are of a higher priority and their corresponding icon will be displayed with the column.


You can edit the expression in the Properties window. To rename a check constraint on column level, right-click the constraint in the Online Browser and select Rename from the context menu.

© 2020 Altova GmbH