This content has been marked as final. Show 2 replies
But after importing the table, I can't find the check constraint anywhere in the model.If the constraint only refers to a single column, it is normally imported as part of the definition of that column.
Open the Column Properties dialog for the column (either from the Columns panel on the Table Properties dialog or from the entry for the column in the Browser tree).
The Column Properties dialog has a "Default and Constraint" panel, which includes 3 fields: List of Values, List of Ranges and Constraint.
You should find that one of these 3 fields contains the details of the Check Constraint; e.g. try clicking on the button for "List of Values".
how can I create check constraints on tables?If the constraint only refers to a single column, you can set the List of Values, List of Ranges or Constraint fields (or a combination of these) as described above.
Alternatively, as Joop described, you can create a "Table Level Constraint" on the Table.
I see a check constraint tab under Tools/ domain administration, but not sure how I can use it.This is only relevant if you are using a domain to define your column. If the Column's datatype is defined using a Domain, and the "Use Domain Constraints" option is set for the Column (on its "Default and Constraint" panel), then the Constraints defined for the Domain (Check Constraint, Ranges and Value List) are used instead of those defined on the Column itself.