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'错误解决

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

 

相关文章:

  • 2022-12-23
  • 2021-09-29
  • 2021-10-03
  • 2021-07-30
  • 2021-10-25
  • 2021-09-29
  • 2021-10-16
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案