Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如:
SELECT groupdate FROM ccl9t_az_articles WHERE groupdate IN ( SELECT * FROM ccl9t_az_articles LIMIT 3 OFFSET 2 ) GROUP BY groupdate
正确的方法是什么?
在错误显示上面的代码返回如下
MariaDB 还不支持 'LIMIT & IN/ALL/ANY/SOME 子查询
通过将上面的代码更改为:
SELECT * FROM ccl9t_az_articles as group1 INNER JOIN ( SELECT groupdate FROM ccl9t_az_articles LIMIT 3 OFFSET 2 ) as group2 ON group1.groupdate = group2.groupdate GROUP BY group1.groupdate