Specifying Primary Keys and Other Constraints for a Table
To define one or more primary keys or other constraints:
-
On the
SQL Tables form, click one of these buttons:
- To specify a new constraint, click
New Constraint. Then
specify a
Constraint Type and
this related information:
- Primary Key
- Specify whether the constraint should be implemented with the clustered attribute.
- Index
- Specify whether the constraint is unique (that is, only one unique combination of the columns contained in the constraint is permitted in the table) and whether the constraint should be implemented with the clustered attribute.
- Foreign Key
- Specify the name of the table to which the current table refers.
- To change an existing constraint, select the constraint from
the grid and click
Modify Constraint.
The data type and constraint name are displayed.
- To specify a new constraint, click
New Constraint. Then
specify a
Constraint Type and
this related information:
- Click Next.
- In the left pane, select the column or columns you want to be constraints on the table. To add them to the Keys pane, click Add.
- Click the Move Up or Move Down buttons to change the order of the columns on the constraint.
- To delete an existing constraint, remove all columns in the right pane.
- To save your changes, click Finish.
Related topics