Here is my problem - I have 2 tables:
|ID|OTHER_STAF|
, where ID is primary key|FPK|ID|SOMETHING_ELSE|
, where combination FPK and ID make primary key, and also ID is a foreign key referenced to WORKER.ID (not null, and must have same value as in WORKER).I want to make stored procedure UPDATE_ID_WORKER
, where I would like to change the value of specific ID in WORKER, and also in all instances of specific value of ID in FIRM.
You shouldn't really do this but insert in a new record instead and update it that way.
But, if you really need to, you can do the following:
ALTER TABLE foo WITH NOCHECK CONSTRAINT ALL
)