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 -> foreign key constraints and indexes

foreign key constraints and indexes

From: ayrobins <anthony_at_lumos.com>
Date: Fri, 30 Nov 2001 18:19:06 GMT
Message-ID: <u4QN7.120$P25.15044@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:19:06 CST

Original text of this message

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