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: primary keys

Re: primary keys

From: TurkBear <noone_at_nowhere.com>
Date: Mon, 29 Oct 2001 14:13:52 -0600
Message-ID: <2qdrttolfo5autv6pva1h2c7dibr573ekm@4ax.com>

you can use a combination of columns for an index( and also a PK) : For instance ( your code will vary )

alter table my_table add MY_PK PRIMARY KEY (coluumn1,column2,column3)

The rules are:( I think)

No Nulls in any of the columns
No duplicates for the 3 column combo

hth

"Herman" <landsaat_at_intekom.co.za> wrote:

>HI there
>
>For most of you this is common knowledge but there is something I'd like to
>know. I would like to make more than 1 column my primary key. If possible
>how is this done?
>
>T.y.
>Herman
>

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!  Check out our new Unlimited Server. No Download or Time Limits! -----== Over 80,000 Newsgroups - 19 Different Servers! ==----- Received on Mon Oct 29 2001 - 14:13:52 CST

Original text of this message

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