--将更新条件保存到临时表里 CREATE TABLE tmp3 AS (SELECT username FROM oa_user WHERE username NOT IN (SELECT username FROM nst_t_account)); --更新表数据,条件从临时表里取 UPDATE oa_user SET usr_update=NOW() WHERE username IN (SELECT username FROM tmp3); --删除临时表 DROP TABLE tmp3…