Home > Q&A > body text
表1
表2
查询语句和结果
结果只显示3条数据,我要显示product表的所有数据,怎么回事?
天蓬老师2017-04-17 15:09:04
Please write like this, the reason for this is improper use of group by select p.id,p.productname,p.productcode,p.price,l.num from p left join (select pid, sum(num) as num from wlms_stock group by pid) l on p.id = l.pid
迷茫2017-04-17 15:09:04
group by should be placed after line 29