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 -> Is this a bug in 9i ( FK question )

Is this a bug in 9i ( FK question )

From: Rob Williamson <robw_at_physics.umd.edu>
Date: Tue, 15 Nov 2005 16:41:33 -0500
Message-ID: <437A560D.FEB9356@physics.umd.edu>


I am running 9i with a slightly outdated patch level. I have two tables Inventory and Shopping_Cart The Inventory has a primary key ( item_number ) smallint not null The Shopping_cart table has a composite pk key acct varchar(10) not null
fname varchar(64) not null
lname varchar(64) not null
item smallint not null

I tried to use the code:
ALTER TABLE shopping_cart
add constraint shopping_cart_fk_inventory foreign key (item)
references (inventory.item_number);

This failed

I could only get the FK to work if I put it in the CREATE table statement;

Anyone seen this.

I have used other Alter table add constraints in my code even referencing the same table inventory.item_number and they worked.
The only difference seems to be that shopping_cart has a composite key.

I am a little behind on my patches so I thought I would ask out here.

Thanks
Rob Received on Tue Nov 15 2005 - 15:41:33 CST

Original text of this message

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