MySQL报错”This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery'”的解决方法

SELECT * FROM my_table WHERE id IN (SELECT id FROM my_table LIMIT 10)

因为版本支持问题, 这句话不能运行

可以像下面这么搞

SELECT * FROM my_table WHERE id IN (SELECT a.id FROM (SELECT * FROM my_table LIMIT 10)AS a)