Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: [Q] create foreign key problem???
Oracle does not automatically create or require an index for enforcement
of a foreign key constraint; it creates (or requires a pre-existing)
index for primary key or unique constraints.
If you want an index on the same columns as the columns in the foreign
key constraint, you will need to create it separately using the CREATE
INDEX command. The USING INDEX part of the constraint clause is only
valid for primary key or unique constraints.
-----Original Message-----
dba1 mcc
I tried to create foreign ley constraint with index using following command:
alter table spinfo add constraint fk11 foreign key (cbnum) references primary_info using index tablespace idx_space
I got "ORA-01735: invalid ALTER TABLE option" on "using index tablespace idx_space". How to use "using index space" with foreign key?
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 20 2005 - 18:10:43 CST
![]() |
![]() |