Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Unique and non unique index

Re: Unique and non unique index

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 18 Mar 2006 08:03:46 -0800
Message-ID: <1142697801.764088@yasure.drizzle.com>


Rama Shankar wrote:
> Hi, Morgan
> You are right . we can also create a non unique index and then add
> primary key using the index.
> eg=>
> create table em as select * from emp;
>
> create index em_empno_idx on em(empno);
>
> alter table em add (constraint pk_em primary key (empno) using index
> em_empno_idx);
>
> But I want to know what are the advantages doing this .Is it only used
> to make the constraint defferable or there is any other advantage also.

Read the article by Tom Kyte ... one of his answers is worth 10, maybe 50, of mine.

But personally I can't think of a really good reason not to make all constraints deferrable.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Sat Mar 18 2006 - 10:03:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US