今天开发要更新一批数据,等了很久也没更新成功.找到了我,我在网上找了一下资料,发现在用rowid的方式更新最快,参照下面的文章更新成功,记录一下 DAVE文章链接:http://blog.csdn.net/tianlesoftware/article/details/6576156 原来的SQL: update t_canhe_member_info a set a.id_card = (select b.id_card from BBB_EEE b where a.member_no = b.
创建临时表 UPDATE sys_user, ( SELECT min(id) AS id FROM sys_userWHERE invitation_expert_user_id = '8a2ebe035de8881e015e134139442b93' AND type = 4 AND del_flag = 0 GROUP BY id) AS tmpSET sys_user.invitation_agent_user_id = '014282c8c3de4d80ab2c4f72d384d6c2