Specifying Primary Keys and Other Constraints for a Table

To define one or more primary keys or other constraints:

  1. 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.

  2. Click Next.
  3. 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.
  4. Click the Move Up or Move Down buttons to change the order of the columns on the constraint.
  5. To delete an existing constraint, remove all columns in the right pane.
  6. To save your changes, click Finish.
Related topics