我想问分组查询是怎么在分组情况下把组内不同的id显示出来的,完全不明白?
SELECT goods_id,goods_name FROM tdb_goods GROUP BY goods_name HAVING count(goods_name) >= 2;就这句,id18与21的name相同,19与22相同,按理说不应显示id,应该报错,我试验也是报错。但视频中出id18,19,匪夷所思。
SELECT goods_id,goods_name FROM tdb_goods GROUP BY goods_name HAVING count(goods_name) >= 2;就这句,id18与21的name相同,19与22相同,按理说不应显示id,应该报错,我试验也是报错。但视频中出id18,19,匪夷所思。
2018-04-27
举报