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: foreign key

Re: foreign key

From: Paul Brewer <paulb_at_pbrewer.demon.co.uk>
Date: 1997/05/15
Message-ID: <eb8c0GAis3ezEw3B@pbrewer.demon.co.uk>#1/1

In article <3374D5B3.6950_at_iol.ie>, Chrysalis <cellis_at_iol.ie> writes
>David Turner wrote:
>>
>> Does anyone know whether an index is created when you
>> create a foreign key. I was under the impression that an
>> index was created for a primary key but am unclear whether an
>> index is created for a foreign and/or a unique key.
>>
>> Any help is appreciated, David T
>No.
>The index, if required (and it usually is), must be created manually on
>the referring key.
>It is, of course, necessary that an index already exist on the
>referred-to primary (or other unique) key.
>
>Chrysalis.

And, I'm told, if you don't create the index on the FK, you can have awful locking problems.

-- 
Paul Brewer
Received on Thu May 15 1997 - 00:00:00 CDT

Original text of this message

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