Create a Primary Key

You can create a primary key from the main window or from the Primary Key Editor.

From the Main Window

To create a primary key:

  1. In the main window, select New from the File menu.
  2. Select Primary Key from the Definitions submenu to open the Select a Table for the Primary Key Definition dialog.
  3. Double-click the desired DB Alias.
  4. Optional – Specify a Pattern to limit the list of tables based on your criteria and click Refresh.
  5. Double-click the desired database table to open the Primary Key Editor.
  6. Select columns to include in the primary key by clicking on a column name in the Available Columns box and dragging it to the Key Columns box.
  7. Use the drag and drop feature to arrange Key Columns in priority order.
  8. Optional – Type a brief description of the primary key.
  9. Select Save from the File menu.

From the Primary Key Editor

To create a primary key:

  1. In the main window, select Primary Key from the Definitions menu to open the Primary Key Editor and last edited primary key.
  2. In the Primary Key Editor, select New from the File menu to open the Select a Table for the Primary Key Definition dialog.
  3. Double-click the desired DB Alias.
  4. Optional – Specify a Pattern to limit the list of tables based on your criteria and click Refresh.
  5. Double-click the desired database table to open the Primary Key Editor.
  6. Select columns to include in the primary key by clicking on a column name in the Available Columns box and dragging it to the Key Columns box.
  7. Use the drag and drop feature to arrange Key Columns in priority order.
  8. Optional – Type a brief description of the primary key.
  9. Select Save from the File menu.

These steps are the minimum required to create a primary key. Because the options to create and modify a primary key are similar, see Using the Editor for details.