How to update primary key
Posted
by slave016
on Stack Overflow
See other posts from Stack Overflow
or by slave016
Published on 2010-03-23T10:55:08Z
Indexed on
2010/03/23
11:03 UTC
Read the original article
Hit count: 422
Here is my problem: I have 2 tables: 1.WORKER, with coloumns |ID|OTHER_STAF| , where ID is primary key, and 2.FIRM, with coloumns |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.
stored procedure:
........ @id .. ???? ........
Thanks for every advice...
© Stack Overflow or respective owner