Adding primary key

To add a primary key:

Procedure

  1. Log on to the MXDM.
  2. In the Navigation tree pane, click Database.

    MXDM displays a list of available systems in My Systems.

  3. Expand a selected system in the navigation tree.

    List of catalogs for the selected system appears.

  4. Click and expand the contents of a Catalog.

    The list of schemas appears.

  5. Expand a schema in the left pane.

    The Tables folder appears.

  6. Expand the Tables folder and select a table in the left pane.
  7. Right-click the table and select Alter Table from the context menu.
  8. Select Add Primary Key.

    Add Primary Key dialog appears.

  9. Select Let SQL/MX choose the name to generate the primary key constraint name automatically, else explicitly provide a primary key constraint name in the Name field.
  10. Select columns from the Columns Available grid and click Add to move them to the Columns in Primary Key grid.
    NOTE:
    • At any point of time use Move Up or Move Down to change the order of the selected columns in the Columns in Primary Key grid.

    • The Add Primary Key context menu is disabled if the table already contains a primary key.

  11. Click OK to add primary key to the table.