Unique Constraints

Unique constraints are a combination of values (represented by Table columns) that uniquely identify a row in the Table. You can have several unique constraints in a Table, one of which can be separately identified as the Primary Key of the Table.

Access     In diagram or Project Browser | Right-click on Table | Features & Properties | Operations > Constraint | Add New Constraint (Ctrl+N)

Create a Constraint



See also


On the Constraint tab of the Columns and Constraints screen, a new constraint is automatically created and assigned the default constraint name and a Type of index.

Overtype the constraint name with a name that identifies this as a unique constraint.




In the Type field, change the value from index to unique.




If you prefer, type an alias for the constraint, in the Alias field.

The Columns field is read-only; it is populated with the columns that you assign to the Involved Columns tab (step 4).




The Available Columns panel lists the columns defined for the Table (on the Columns tab).

For each column to assign to the constraint, either:

·Right-click on the column name and select Assign column '<name>' or
·Press Ctrl+left arrow or
·Double-click on the column name


The column name is transferred to the Involved Columns tab.




If you do not want the assigned column in the Involved Columns tab, either:

·Right-click on it and select Unassign column '<name>', or
·Press Ctrl+right arrow, or
·Double-click on the column name




If you have a number of columns in the constraint, you can rearrange the sequence by right-clicking on the column to move and selecting either:

·Move column '<name>' up   (Ctrl+Up arrow) or
·Move column '<name>' down   (Ctrl+Down arrow)




If necessary, you can type a formatted comment in the field on the Notes tab.




(On the Columns and Constraints dialog) Click on the Close button.



Delete a unique constraint

If you do not want to keep a unique constraint, either:

·Right-click on it in the list and select Delete constraint '<name>', or
·Click on the item and press Ctrl+D


The constraint is immediately deleted.

Learn more