How to resolve this error Field 'STATE_REGION' doesn't have a default value in MySQl 5.6

*爱你&永不变心* 提交于 2019-12-25 02:05:45

问题


I had an error like the following

Field 'STATE_REGION' - Field Name doesn't have a default value in MySQL 5.6.

I fixed the issue by changing sql_mode = ''; in previous version of MySQL

But failed in MySQL 5.6

How to fix this issue in MySQL 5.6. Please help any help is much appreciated.


回答1:


Got Solution To my Problem
Just add IGNORE after INSERT

INSERT IGNORE INTO tblname(....

"INSERT IGNORE" vs "INSERT ... ON DUPLICATE KEY UPDATE"

Thanks:)



来源:https://stackoverflow.com/questions/22978875/how-to-resolve-this-error-field-state-region-doesnt-have-a-default-value-in-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!