A unique constraint ensures no duplicate values are entered into specified columns that are not a table’s primary key. For example, in the employee
table in which the emp_id
column is the primary key, you can define a unique constraint that requires entries in the Social Security number (ssn
) column to be unique within the table.
In database diagrams, you use the Indexes/Keys property page to create, modify, or delete unique constraints.
To | See |
Ensure no duplicate values are entered in specific columns | Creating a Unique Constraint |
Change the columns that the constraint is attached to, change the constraint name, or set additional properties for the constraint | Modifying a Unique Constraint |
Remove the requirement for uniqueness for values entered in the column | Deleting a Unique Constraint |