mysql int类型字段插入空字符串时自动转为0时间:2023-03-09 06:38:16 mysql int类型字段插入空字符串时自动转为0 如果不想转的话可以修改配置文件 修改 my.ini 文件. # Set the SQL mode to strictsql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” 改为: # Set the SQL mode to strictsql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”