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: convert unique index to primary key

Re: convert unique index to primary key

From: Van Messner <vmessner_at_bestweb.net>
Date: Mon, 25 Mar 2002 17:10:47 -0500
Message-ID: <u9v8e4cbp60q50@corp.supernews.com>


Yes, the primary key will just grab the index - no matter whether you had columns that allowed nulls, or no matter the column order. So it's best to drop the index then create a primary key.

"Connor McDonald" <connor_mcdonald_at_yahoo.com> wrote in message news:3C9F7594.7EE0_at_yahoo.com...
> damorgan wrote:
> >
> > Drop the unique index. Create the primary key.
> >
> > Daniel Morgan
> >
> > karolina wrote:
> >
> > > Hi,
> > >
> > > I have some tables with unique indexes. I want to convert those unique
> > > indexes to primary keys. Does anybody have a script that runs through
> > > the tables and convert unique indexes to primary keys?
> > >
> > > thanks!
>
> Or don't even drop the index...the primary key will just grab it.
>
> hth
> connor
> --
> ==============================
> Connor McDonald
>
> http://www.oracledba.co.uk
>
> "Some days you're the pigeon, some days you're the statue..."
Received on Mon Mar 25 2002 - 16:10:47 CST

Original text of this message

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