添加女神不成功怎么弄?

来源:2-4 JDBC实战---搭建模型层 Ⅱ

慕运维3262742

2017-01-09 21:04

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 'valuse('ss',1,22,'2017-01-09','xiaoxia@imooc.com','110','ADMIN',current_date,'AD' 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 com.imooc.bao.GoddessDao.addGoddess(GoddessDao.java:35)

at action.Godessaction.main(Godessaction.java:27)


写回答 关注

2回答

  • qq_青羽天穹_0
    2017-03-08 13:16:19

    我也是这个错误

  • Silenc_zk
    2017-01-10 10:25:42

    sql语句有问题,代码附上来看看呢

JDBC之 “ 对岸的女孩看过来”

一起领略JDBC的奥秘,为进一步学习集成框架打下良好的基础

99327 学习 · 856 问题

查看课程

相似问题