changing value of a primary key in a table and FK in referenced tables
- by sergiogx
I wish to change the primary key of a table, and also change the foreign key of the tables that reference it.
for example table employee has PK idEmployee = 1
table payroll has FK idEmployee = 1
I want to update employee to idEmployee = 2 and let the table payroll change FK idEmployee automatically.
is this posible in mysql?
thanks.