您的位置:首页 > 产品设计 > UI/UE

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

2017-11-27 11:23 1186 查看
转载:点击阅读原文

在MySQL4.1中子查询是不能使用LIMIT的,手册中也明确指明 “This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery’ ”

也就是说,这样的语句是不能正确执行的。

select * from table where id in (select id from table limit 10);

但是,,但是,,,只要你再来一层就行。。如:

select * from table where id in (select t.id from (select * from table limit 10)as t)

你说说,MySQL是不是很让人无语??
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql 子查询 limit in
相关文章推荐