这样的语句是不能正确执行的。
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不支持子查询里有limit解决办法
最新推荐文章于 2025-07-24 14:52:09 发布

这样的语句是不能正确执行的。
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)