-- 这种批量更新的需要,在外面套一层selectUPDATE iot_device
SET NAME ='xxx'WHERE
id IN(SELECT t.id FROM(SELECT id FROM iot_device WHERE orgId ='600205') t );-- 第二种UPDATE shuangkua_hangye hy
LEFTJOIN sheet1 s ON hy.id = s.device_num
LEFTJOIN iot_area a ON a.area_name = s.device_eara
SET hy.device_area_id = a.id
WHERE
hy.is_delete =0;