需求:一个a表的A列等于b表的B列 但拥有的相同列C列值不相同 需要将其改成一样的
UPDATE vd_auth_switch vas,
tb_student ts
set vas.class_id = ts.class_id
WHERE
vas.owner_id = ts.id
AND vas.class_id != ts.class_id
AND ts.deleted = 0;
当时少写了一个字段
UPDATE vd_auth_switch vas
set vas.class_id = ts.class_id
WHERE
vas.owner_id = ts.id
AND vas.class_id != ts.class_id
AND ts.deleted = 0;
结果就报错啦