为什吗老师的group by后面只有goods_name,但却可以投影出good_id,求大佬解答。
我的代码:
mysql> select goods_id,goods_name from tdb_goods group by goods_name;
ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'scoredb.tdb_goods.goods_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by