mysql update in 子查询改写

#子查询(不支持)
update question q set q.`level`=2 where q.id in( select id from  question where id>=2111 limit 165,165);


#改写
update question q inner join ( select id from  question where id>=2111 limit 165,165) t on q.id=t.id set q.`level`=2;

猜你喜欢

转载自www.cnblogs.com/hdwang/p/9204217.html