I have 2 tables:
PrimKey
001
002
And:
ID | ForeignKey
a | 001
b | 002
c | 002
I want to delete, let’s say, row 002 and ‘bind’ all 002 foreign keys to 001, so it will look like:
PrimKey
001
And:
ID | ForeignKey
a | 001
b | 001
c | 001
FK constraints do not allow me to do UPDATE + DELETE. Any tip where to dig?
You have to do it from the other direction. Change the rows in the second table to point to a different PK in the first table; then when there are no references to row002, you can delete it.