I am using sybase's sqlanywhere17. I have tables inventory
and user_inventory
.
I get an error when deleting a row in table "inventory":
Row with identifier of 1 cannot be deleted, because it has references in table user_inventory
Even though I have created table user_inventory
with FOREIGN KEY (ITEM_ID) REFERENCES INVENTORY (ITEM_ID) ON DELETE CASCADE
, it doesn't delete them.
Both tables have item_id
( item_id
is PK in table inventory
)
Why can't I delete inventory
rows?