Adding a Unique Constraint

Previous
Previous
Next
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:

  1. Log in to the Database Home Page. See "Logging in to the Database Home Page".

  2. On the Database Home Page, click the Object Browser icon.

  3. In the Object list, select Tables then click the personal_info table that you previously created.

  4. Click the Constraints tab.

  5. Click the Create button.

  6. On the Add Constraint page, use the following information to complete the page.

    Constraint Name: PERSONAL_INFO_UNIQUE_CON
    Constraint Type: Unique
    Unique Column 1: SOCIAL_SECURITY_ID(VARCHAR2)
  7. Click the Next button.

  8. Click the Finish button to complete the action.