mysql子查询含有limit时报错:
ERROR 1235 (42000): This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’
这样的SQL无法执行 :
1 | select * from table where id in (select id from table limit 10); |
解决方法
如:
1 | select * from table where id in (select t.id from (select * from table limit 10)as t) |