This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME 错误解决
在一个Mysql表达式中使用嵌套查询,出现了这个错误。原因是内层select语句带有limit子句。 在网上查了下,有文章指出:- 比如这样的语句是不能正确执行的。
- select * from table where id in (select id from table limit 12);
- 但是,只要你再加一层就行。如:
- select * from table where id in (select t.id from (select * from table limit 12)as t)
- 这样就可以绕开limit子查询的问题。
- 问题解决。
- select * from (select id from table limit 12) as foo;
mysql分页查询
标签: