3. Using the Tables Utility : Create a Table : How Unique Keys Are Set
 
Share this page                  
How Unique Keys Are Set
You can prevent a user from entering duplicate rows in a table by specifying that all key columns for a table shall be unique keys. The unique key columns function as a combined unique constraint during data entry, which can improve performance and data integrity. If you use unique keys in your table, you require that each key value in the table be unique. The key value is the concatenation, or combined listing, of all the values in the key columns in a row. If you specify unique keys, the table can only hold one record for each combined key value.
For example, if you have specified that Firstname and Lastname are the key columns in your table, and you specify that your table must use unique keys, then the combined Firstname and Lastname columns are the unique key value for the table. This prevents any entry that has a combined first and last name from being identical to an existing entry in the table.
To make all key columns in your table a combined unique constraint:
1. After creating a table in an Ingres database and entering key columns for the table, select End. The Tables Utility displays a pop‑up menu:
2. Move the cursor to the Unique option on the Unique Keys pop‑up frame and click the appropriate mouse button or choose Select at the bottom of the frame to make the columns you specified in the Key column your combined unique constraint.