Oracle

Unique Constraint

Figo Kim 2006. 11. 23. 21:28
1. Either the table level or the column level

CREATE TABLE employees (
      employee_id             NUMBER(6),
      last_name                VARCHAR2(25) NOT NULL,
      email                       VARCHAR2(25),
       ...
      ...
      CONSTRAINT emp_email_uk UNIQUE(email));

** The Oracle server enforces the UNIQUE constaint by implicityly creating a unique index on the unique key column or columns.