limit不支持内层嵌套
[select * from c_talk where talk_id in ( select talk_id from c_post group by talk_id order by count(post_id) limit 0,14)]提示limit不支持内层。。。
MYSQL什么版本? 应该支持, 错误提示的实际内容是什么?
到底是不支持LIMIT还是缺少别名? 加上T再试。
select * from c_talk where talk_id in ( select talk_id from c_post group by talk_id order by count(post_id) limit 0,14) t
select * from c_talk A,(select talk_id,count(*) as pid from c_post group by talk_id)B
where A. talk_id=B.talk_id
order by B.pid
limit 0,14;
select * from c_talk a
inner join
select talk_id from c_post group by talk_id order by count(post_id) limit 0,14) b
on a.talk_id=b.talk_id