This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

阅读更多
SELECT id FROM t_play WHERE game_id IN (SELECT id FROM t_game LIMIT 0,10)


上面的SQL语句报错:错误码: 1235
This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

Execution Time : 00:00:00:000
Transfer Time  : 00:00:00:000
Total Time     : 00:00:00:000

只需要如下修改就好:



SELECT id FROM t_play WHERE game_id IN (SELECT id FROM (SELECT id FROM t_game LIMIT 0,10)AS t)


至于原因不言而喻




.

你可能感兴趣的:(mysql,sql,limit)