1. 程式人生 > >MySQL不支援子查詢裡有limit解決辦法

MySQL不支援子查詢裡有limit解決辦法

這樣的語句是不能正確執行的。
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)