为了账号安全,请及时绑定邮箱和手机立即绑定

关于mysql语句不兼容问题,如何优化语句?

关于mysql版本不兼容问题,如何优化?

mysql版本: Ver 14.14 Distrib 5.7.28, for Win64 (x86_64)

执行语句:

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 'test.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

http://img1.sycdn.imooc.com//5de0855a00012e5a13470407.jpg

正在回答

举报

0/150
提交
取消
与MySQL的零距离接触
  • 参与学习       397028    人
  • 解答问题       3350    个

本课程涵盖全部MySQL数据库的基础,学习MySQL数据库的基础知识

进入课程

关于mysql语句不兼容问题,如何优化语句?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信