javaweb开发
ERROR SqlExceptionHelper:144 - Field 'userId' doesn't have a default value
(eclipse,SQLyog,tomcat7)
16:29:54,068 DEBUG SQL:104 -
insert
into
User
(password, username)
values
(?, ?)
16:29:54,100 TRACE BasicBinder:83 - binding parameter [1] as [VARCHAR] - A
16:29:54,100 TRACE BasicBinder:83 - binding parameter [2] as [VARCHAR] - A
16:29:54,147 WARN SqlExceptionHelper:143 - SQL Error: 1364, SQLState: HY000
16:29:54,147 ERROR SqlExceptionHelper:144 - Field 'userId' doesn't have a default value
怎么解决,谢谢,,急需,,,
------最佳解决方案--------------------字段userId是必须的 没有默认值 有没有添加上主键自动生成策略呢
------其他解决方案--------------------null