2 Day Developer > Managing Database Objects > Managing Tables > Adding a Unique Constraint
Adding a Unique Constraint |
Previous |
Next |
You can use Object Browser to add a constraint to a table after it has been created. In the personal_info
table, you might want to enforce the rules so that each social security ID is unique. For information about the unique constraint, see "Unique Constraint".
To add a unique constraint:
Log in to the Database Home Page. See "Logging in to the Database Home Page".
On the Database Home Page, click the Object Browser icon.
In the Object list, select Tables then click the personal_info
table that you previously created.
Click the Constraints tab.
Click the Create button.
On the Add Constraint page, use the following information to complete the page.
PERSONAL_INFO_UNIQUE_CON
Unique
SOCIAL_SECURITY_ID(VARCHAR2)
Click the Next button.
Click the Finish button to complete the action.