出現場景:使用子查詢時
這版本的 MySQL 不支持使用 LIMIT 子句的 IN/ALL/ANY/SOME 子查詢
意味着下列查詢不能正確的執行
select * from my_table where id in (select id from my_table limit 10)
解決方案:
select * from my_table where id in (select t.id from (select * from my_table limit 10)as t)
再套一次查詢就OK了
說在最後的話:編寫實屬不易,若喜歡或者對你有幫助記得點贊+關注或者收藏哦~