MySQL也真是让人郁闷(关于子查询中使用limit)

在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是不是很让人无语??

原文地址:https://www.cnblogs.com/fnlingnzb-learner/p/6340728.html