mysql - How to set the group by statement in sequel Pro to default to the first record of the group
PHP中文网
PHP中文网 2017-07-07 10:35:36
0
1
1770

select age,money from t1.gz group by age;
发现报错:Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 't1.gz.money' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
曾经蜡笔没有小新

Your current sql_mode does not allow non-aggregated fields to appear in the form of non-aggregated functions. Just change sql_mode, or min(id) takes the first row of records and then connects to the original table to get the results you want

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template