String sql="insert into userInfo(NAME,EMPCODE,DEPTCODE,SEX,TEL,MOBILE,STATE,USERTYPE,ADDRESS,POSTALCODE,STATION,QQ) " +
"values(?,?,?,?,?,?,?,?,?,?,?,?) where userId=?";
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where userId=1434594273200' at line 1
SQL语句错误,userId就是这样的
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
6条回答 默认 最新
SimbaLi123 2015-06-23 07:58关注这样写不对啊,insert插入语句怎么能指定userId;按照你的逻辑应该使用update
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报