MySQL8子查询提示:This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery

Posted 在奋斗的大道

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL8子查询提示:This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery相关的知识,希望对你有一定的参考价值。

报错SQL:

select ucas_individual_proj.individual_proj_name from ucas_individual_proj where ucas_individual_proj.sid in(
	select ucas_file_info.individual_proj_sid from ucas_file_info where ucas_file_info.individual_proj_sid is not null and ucas_file_info.pdf_path is not null limit 1, 10
);

提示错误信息:

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

正确SQL:子查询多嵌套一层

select ucas_individual_proj.individual_proj_name from ucas_individual_proj where ucas_individual_proj.sid in(
	select t.individual_proj_sid from 
		(select * from ucas_file_info where ucas_file_info.individual_proj_sid is not null and ucas_file_info.pdf_path is not null limit 1, 10) as t
);

以上是关于MySQL8子查询提示:This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery的主要内容,如果未能解决你的问题,请参考以下文章