I have a database with two tables, PROCESS (PK Process_Id) and PROCESS_STAGE (PK Stage_Id, FK Process_Id).
At least I think I have set this up – in the foreign key relationships dialogue box I have
- Foreign key base table: PROCESS_STAGE,
- Foreign key columns:
Process_Id, - Primary/unique key base table: PROCESS,
- Primary/unique key column:
Process_Id.
I have also set enforce for replication and enforce foreign key constraints to ‘Yes’.
But I can still do the following things which break this relationship:
- Delete items from PROCESS which have references from
PROCESS_STAGE
What do I need to do to correct this?
Thanks!
Try using SQL to create the foreign key
If this still fails, look at the tables schema/owner: you may have more than one table and you’re using the wrong one. Example: