ERROR 1067 (42000): Invalid default value for ‘last_updated_on’
Solution:
Remove the values: NO_ZERO_IN_DATE,NO_ZERO_DATE in sql_mode.
show variables like 'sql_mode';
Outcome:
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
Modify sql_mode:
set session
sql_mode=’ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;
Execute successfully!
Read More:
- [Solved] MySQL5.6.44 [Err] 1067 – Invalid default value for create_date settlement programme
- [MySQL] mysql 5.5 and 5.6 timestamp default default value CURRENT_TIMESTAMP problem
- How to Solve mysql [Err] 1067-Invalid default value for
- Mysql ERROR 1067: Invalid default value for ‘date’ [How to Solve]
- [Solved]ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql
- MYSQL: CURRENT_TIMESTAMP & ON UPDATE CURRENT_TIMESTAMP
- [Solved] MySQL: Syntax error or access violation: 1055 Expression #1 of SELECT list is not …
- MYSQL gruop by Error: this is incompatible with sql_mode=only_full_group_by
- How to Solve MySQL version 5.7+ Group by group error
- [Solved] MySQL Error: “Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”
- How to Fix MySQL error 1005: can’t create table (errno: 150)
- Mysql :error 1111. Invalid use of group function
- [Solved] MYSQL 5.7 gruop by eRROR: this is incompatible with sql_mode=only_full_group_by
- MySQL 8.0.12 runs SQL error #1055 [How to Solve]
- [Solved] MYSQL Start Project Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] MySQL Error: ERROR 1055 (42000)sql_mode=only_full_group_by
- mysql workbench Error Code: 1046. No database selected Select the default DB to be used by doubl
- [Solved] MySQL: datetime (0) null default NULL
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- Idea connect mysql error Server returns invalid timezone. Go to’Advanced’ tab and set’serverTimezone’ property