update子查询

UPDATE icbc_integral_record AS re ,
(SELECT p.p_id,p.i_id,p.p_lang FROM
`icbc_integral_record`  AS r,`icbc_integral_product` AS p
WHERE  p.`p_id`=r.`p_id`)AS t
SET  re.i_id=t.i_id,re.p_lang=t.p_lang
WHERE re.p_id=t.p_id

你可能感兴趣的:(update)