mysql error This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery

来源:互联网 发布:传奇3装备数据库 编辑:程序博客网 时间:2024/06/10 17:45

遇到MySQL报错:

This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery


改好之前:

update file_data set check_status = 0 where  1=1 limit 0,20


改好之后:

update file_data set check_status = 0 where id in (select t.id from (select id from file_data where 1=1 limit 0,20) as t)


封装select两层就可以了.


参考url:

http://www.laruence.com/2008/07/16/227.html

0 0
原创粉丝点击