码迷,mamicode.com
首页 > 其他好文 > 详细

groupby 和left join

时间:2018-12-10 23:30:26      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:erro   Plan   back   color   词条   nbsp   lan   syn   hat   

select * from so_android_hour sah group by open_third_party left join so_plan sp on sah.open_third_party=sp.sell_no limit 10;

词条语句报错:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘left join so_plan sp on sah.open_third_party=sp.sell_no limit 10‘ at line 1

select * from so_android_hour sah left join so_plan sp on sah.open_third_party=sp.sell_no limit 10;没有 group by open_third_party正常执行。

结论groupby和join不能用在一条语句

groupby 和left join

标签:erro   Plan   back   color   词条   nbsp   lan   syn   hat   

原文地址:https://www.cnblogs.com/huiandong/p/10099828.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!