RsD0p9BK
8/4/2016 - 5:28 AM

update_with_join.sql

-- How to update one table based on another table's values on the fly?
-- http://dba.stackexchange.com/questions/21152/how-to-update-one-table-based-on-another-tables-values-on-the-fly/36664
UPDATE ips 
INNER JOIN country
  ON ips.iso = country.iso
SET ips.countryid = country.countryid