Re: What is unique_id in Oracle and what's the use of it

From: Mark D Powell <>
Date: Wed, 30 Jan 2008 06:36:18 -0800 (PST)
Message-ID: <>

On Jan 30, 6:01 am, venki <> wrote:
> On Jan 30, 8:47 am, newa <> wrote:
> > Hi,
> > I am new to Oracle and today someone asked me about the "fference
> > between unique_id and primary key. Which to use and why?" I know about
> > the primary key but not unique_id. Can someone kindly give me an
> > overview of it?
> > Thanks in advance.
> Primary key is the combination of NOTNULL constraint and unique key
> constraint.
> so it ll never allow duplicate and null value.But unique key  allows
> number of null value but it never allow duplicate value.
> Do not compare this to MS sqlserver, bcoz it some what different from
> oracle to sql. Bcoz unique key will alow only one null value.
> venki

This question or minor variations of it have been asked many times. Here is a brief explanation of what PK, UK, and FK constraints are and the indexes used to support them.

What is the difference between a unique index and a unique constraint?

HTH -- Mark D Powell -- Received on Wed Jan 30 2008 - 08:36:18 CST

Original text of this message