首页 > 数据库技术 > 详细

Mysql:1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'错误解决

时间:2017-03-07 23:07:14      阅读:2439      评论:0      收藏:0      [点我收藏+]
select distinct b.sale_count
from product_sale b 
where b.pro_id 
in
(select a.pro_id from product a LIMIT 0,2);

错误描述[Err] 1235 - This version of MySQL doesn‘t yet support ‘LIMIT & IN/ALL/ANY/SOME subquery‘

只要在加一层就可以解决问题了

select distinct b.sale_count
from product_sale b 
where b.pro_id 
in
(select t.pro_id from (select a.pro_id from product a LIMIT 0,2) as t);

 

表结构如下:

技术分享

技术分享

 

Mysql:1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'错误解决

原文:http://www.cnblogs.com/zyh1994/p/6517132.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!