dimanche 11 juillet 2021

MySQL table update after multi field check

Hi I have two table one like this one: table1 enter image description here

and one like this: table2

enter image description here

I would like to update all the fields on the table2 column "newID" based on this rules: if (table2.ID = table1.ID_actual or table2.ID=table1.ID_old) then table2.newID = table1.newID How can I resolve this problem ?

Aucun commentaire:

Enregistrer un commentaire