Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Primay keys
I have tried 2 ways:
-1.
create table bbb
( field1 char(6) primary key,
field2 char(6) primary key);
error: ora-02260: table can have only one primary key
-2.
create table bbb
(field1 char(6),
field2 char(6)
primary key (field1,field2));
found this in one in an old sql book but it doesn't work.
error:
error at line 4: ora-00907: missing right parenthesis.
I already got one solution and that is to use constraints (but first I have to find out how constraints work). I'm just a newbie and every step I make costs me a lof of time. I have experience with access, notes/domino so I'm not a newbie in database developing, only a newbie in oracle. I have to say that oracle is terrible difficult for newbies.
thanks to all,
Jan
"Michel Cadot" <micadot_at_netcourrier.com> wrote in message
news:82m1j8$116ca$1_at_oceanite.cybercable.fr...
> What is your command to create it and your error (ORA-...)?
>
> Jan <Jan_Gerards_at_hotmail.com> a écrit dans le message :
> 82ljb5$622$1_at_tesla.a2000.nl...
> > I have a table with a few fields.
> > Two of them (together) I want to make a primary key.
> > But it doesn't work.
> > Do you have any ideas ?
> >
> > thanks in advance,
> > Jan
Received on Thu Dec 09 1999 - 11:11:36 CST
![]() |
![]() |