UPDATE vn.supplierAccount sa JOIN vn.country c ON sa.countryFk = c.id AND c.code = 'FR' SET countryFk = c.id WHERE iban = 'FR7630003012690002801121597'; UPDATE vn.supplierAccount sa JOIN vn.country c ON sa.countryFk = c.id AND c.code = 'PT' SET countryFk = c.id WHERE iban = 'PT50001000005813059150168';