问答详情
源自:2-4 JDBC实战---搭建模型层 Ⅱ

SQL语句报错,检查不出来

Exception in thread "main" com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'create_date,update_user='ADMAIN',update_date=current_date(),isdel=1  where id=3' at line 1

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:882)

at jdbc_dao.GoddessDao.updateGoddess(GoddessDao.java:55)

at jdbc_action.GoddessAction.main(GoddessAction.java:23)

http://img.mukewang.com/594de4a0000171c905880505.jpg

http://img.mukewang.com/594de4a100013fc405000402.jpg

http://img.mukewang.com/594de4a10001c45f07170543.jpg

http://img.mukewang.com/594de4a20001152706640546.jpg


提问者:黑夜1 2017-06-24 12:04

个回答

  • 黑夜1
    2017-06-24 12:58:35

    已解决,是语句错误