sql模式报错:
mysql> select dname,max(sai),min(sai),avg(sai) from emp e inner join dept d on e.deptno=d.ddeptno and e.deptno=10;
ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'db1.d.dname'; this is incompatible with sql_mode=only_full_group_by
sql模式修改:
1、查询sql模式
mysql> show variables like 'sql_mode%' ;
+---------------+---------------------------------------------------------------