| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key constraints and indexes
You need to create the index. If you don't you will lock the parent table
when you insert.
Jim
"ayrobins" <anthony_at_lumos.com> wrote in message
news:u4QN7.120$P25.15044_at_dca1-nnrp2.news.digex.net...
> Hi,
>
> Sorry if this question was asked before.
>
> Some databases create non-unique indexes when a foreign key constraint is
> created. i.e.
> create table test2
> (id number, id2 number unique, constraint fk_test2 FOREIGN KEY (id)
> references test(id));
>
> So a non unique index would be created on id in test2.
> Oracle does not seem to do this.
>
> However, it does this for primary keys and unique constraints.
>
> Is this a configurable thing? Can i make oracle do it automatically or do
i
> need to manually create
> the index.
>
> thanx in advance.
>
>
Received on Fri Nov 30 2001 - 12:20:47 CST
![]() |
![]() |