default
(一)Invalid default value for ' 字段名'
解决方式:
- 枚举类DECIMAL的,有中文字,在建立数据库或表的时候要设置 charset = utf8
update 与 delete
(一)You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.
原因:
- 这是因为MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令。
解决方式:
- 解除输入的安全模式
- 1.show variables like ‘SQL_SAFE_UPDATES’;查看开关状态。
- 2.SET SQL_SAFE_UPDATES = 0;修改下数据库模式