Key Constraint Definition

Use the Key Constraints dialog to define key constraints for a table or to view the definition of a constraint that is already defined. You can add a new constraint, view a constraint definition, or remove a constraint. You cannot, however, change the constraint definition once the constraint is created. If you want to change a key constraint, you must first delete the constraint and then recreate it.

Constraint name
Specify the SQL name for the constraint.

Constraint type
Specify the constraint type. Possible values are:

Unique key
Defines a unique key composed of the columns identified in the column selection grid. The identified columns cannot be the same as the columns specified in another UNIQUE constraint or PRIMARY constraint that was specified earlier for the same table. For example, UNIQUE (A,B) is the same as UNIQUE (B,A).

Primary key
Defines a primary key composed of the columns identified in the column selection grid. A table can only have one primary key. The identified columns cannot be the same as the columns specified in another UNIQUE constraint specified for the same table. For example, PRIMARY (A,B) would not be allowed if UNIQUE (B,A) has already been specified.

See also Available columns