SELECT list is not inGROUP BY clause and contains nonaggregated column
MySQL严格模式次要用以下场景
- 不反对对not null字段插入null值
- 不反对对自增长字段插入”值
- 不反对text字段有默认值
咱们用不到时能够敞开它,在Laravel中能够编辑database.php,敞开严格模式,不应用框架时,能够编辑my.ini
在[mysqld]加一行
[mysqld]sql-mode=""
重启MySQL,就敞开了
SELECT list is not inGROUP BY clause and contains nonaggregated column
MySQL严格模式次要用以下场景
咱们用不到时能够敞开它,在Laravel中能够编辑database.php,敞开严格模式,不应用框架时,能够编辑my.ini
在[mysqld]加一行
[mysqld]sql-mode=""
重启MySQL,就敞开了