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

Home -> Community -> Usenet -> c.d.o.server -> Re: Can I add primary key constraint?

Re: Can I add primary key constraint?

From: neerajv <neerajv_at_email.msn.com>
Date: 2000/07/04
Message-ID: <#BTR4Lk5$GA.292@cpmsnbbsa09>#1/1

Test

--
------------------------------------------------
Neeraj Verma
(303) 873 0415
neerajv_at_email.msn.com
Atta ur-Rehman <atta707_at_my-deja.com> wrote in message
news:8judhb$gbv$1_at_nnrp1.deja.com...

> In article <8juad8$edg$1_at_nnrp1.deja.com>,
> Carfield Yim <carfield_at_my-deja.com> wrote:
> > When I use the following SQL command to add primary key
> > constraint:
> >
> > alter table deletelog add constraint pk_deletelog primary key
> > (type, id) using index tablespace renren_idx
> >
> > I receive the following error message:
> >
> > SQL> alter table deletelog add constraint pk_deletelog primary
> > key(type, id);
> > alter table deletelog add constraint pk_deletelog primary key
> > (type, id) using index
> > *
> > ERROR at line 1:
> > ORA-02437: cannot enable (RENREN.PK_DELETELOG) - primary key
> > violated
> >
> > How can I add primary key constraint?
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> well, the composite key (type, id) in your table is not unique, to
> enable a primary key the existing data in the given column(s) has to be
> unique. try to remove the duplicate instances and try the same command
> again.
>
> hope that helps.
>
> regards,
>
> ATTA
>
> --
>
> getting the meanin' of data...
> >
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Jul 04 2000 - 00:00:00 CDT

Original text of this message

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