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:
- In the main window, select New from the File menu.
- Select Primary Key from the Definitions submenu to open the Select a Table for the Primary Key Definition dialog.
- Double-click the desired DB Alias.
- Optional – Specify a Pattern to limit the list of tables based on your criteria and click Refresh.
- Double-click the desired database table to open the Primary Key Editor.
- 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.
- Use the drag and drop feature to arrange Key Columns in priority order.
- Optional – Type a brief description of the primary key.
- Select Save from the File menu.
From the Primary Key Editor
To create a primary key:
- In the main window, select Primary Key from the Definitions menu to open the Primary Key Editor and last edited primary key.
- In the Primary Key Editor, select New from the File menu to open the Select a Table for the Primary Key Definition dialog.
- Double-click the desired DB Alias.
- Optional – Specify a Pattern to limit the list of tables based on your criteria and click Refresh.
- Double-click the desired database table to open the Primary Key Editor.
- 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.
- Use the drag and drop feature to arrange Key Columns in priority order.
- Optional – Type a brief description of the primary key.
- 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.