Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: convert unique index to primary key
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