Om table_2 är tom, försök sedan med följande infogningssats:
insert into table_2 (itemid,location1)
select itemid,quantity from table_1 where locationid=1
Om table_2 innehåller redan itemid värden, prova sedan denna uppdateringssats:
update table_2 set location1=
(select quantity from table_1 where locationid=1 and table_1.itemid = table_2.itemid)