【MySQL】Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

1.登录MySQL

打开cmd,输入:

mysql -uroot -p

回车后输入密码,即进入

2. 更改global.sql_mode

select @@global.sql_mode

查询出来的值为:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

去掉ONLY_FULL_GROUP_BY,重新设置值。

set @@global.sql_mode 
='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
上一篇:ionic 按钮、导航等组件的使用


下一篇:【内存管理】ION内存管理器浅析(system contig heap)