Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Foreign key references XML column

217847Oct 19 2003 — edited Oct 21 2003
In documentation there are some examples of making foreign key on XML table that references relation table field. What about foreign key that references XML column (attribute)?

I tried something but without success:

CREATE UNIQUE INDEX ICOMMUNITY_ID
ON XMLBITSSTORE("XMLDATA"."community"."community-id");

I had no problem with that. I checked that unique index and it worked.

After that I tried:

alter table XMLISSUE
add constraint community_fk foreign key (xmldata."issue"."community-id")
references XMLBITSSTORE("XMLDATA"."community"."community-id");

and I got an error:

ORA-02270: no matching unique or primary key for this column-list

But ICOMMUNITY_ID is unique index created on that column!

My database release is 9.2.0.1.0.

Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2003
Added on Oct 19 2003
6 comments
339 views