Use the Add Unique Key window to define
a unique key for your table or nickname. You can define more than
one unique key for the same table or nickname.
About this task
For tables, these windows are accessed from the Keys page
of the Alter Table notebook. For nicknames, these
windows are accessed from the Keys page of Alter
Nickname notebook.
Procedure
- To add unique keys using the Control Center:
- Open the Add Unique Key window:
From the Control Center, expand the object tree until you find the Tables folder.
Click the Tables folder. Any existing tables
are displayed in the pane on the right side of the window (the contents
pane). Right-click the table you want in the contents pane and select
Alter from the pop-up menu. The Alter Table notebook
opens. If you are adding a unique key to a nickname, open the Alter
Nickname notebook. On the Keys page,
click Add. The Add Unique Key window
opens.
- Select the column or columns that you want to define
or change as unique key columns.
- Optional: Type the constraint name of the unique key.
- To add unique keys using the command line, use the ALTER
TABLE statement.