I have Table-A with a column called serial_number, and Table-B has the same column.
Update a single table is not possible to their linkage, upon attempt though, this is the error:
The UPDATE statement conflicted with the FOREIGN KEY constraint
“L_231”. The conflict occurred in
database “Main”, table “dbo.Products”.
The statement has been terminated.
I know how I can delete the field in both in case I need to, I just don’t know how to update it simultaneously.
Thanks.
this is a BAD design. if this isn’t a “one time thing” to fix an issue, but part of your applicaion, you need a redesign.
You shouldn’t update keys, use a surrogate key (like an identity) instead and then store the
serial_numberas a plain data column (which can be easily changed).