UPDATE material, pricelist
SET price = '23'
WHERE material.id = 1936 AND
material.id = pricelist.material_id AND
pricelist.import_date = (SELECT max(pricelist.import_date))
答案 0 :(得分:0)
这是您想要的吗?
UPDATE pricelist pl
SET pl.price = '23'
WHERE pl.material_id = 1936
ORDER BY pl.import_date DESC
LIMIT 1;