Quick Search:
 
 The Oracle UNIQUE Constraint      [Return To Index] Jump to:  

Term: UNIQUE

Definition:
The UNIQUE constraint ensures that all values in a column are distinct, that is, the column cannot contain two identical instances of any value. Attempting to insert a duplicate value into a UNIQUE column will violate the UNIQUE constraint and result in an error.

The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns.

Note that a PRIMARY KEY constraint automatically includes a UNIQUE constraint.

Example Syntax:

CREATE TABLE users
(user_id integer Unique,
Last_Name varchar (30),
First_Name varchar(30));


Related Links:

Related Code Snippets:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org