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

下面的错误是什么意思,大神帮忙解答一下

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,update-date,isDel)values('?°??–—???',1,28,'2016-11-16','' at line 1

提问者:疏影暗香4171408 2016-11-16 17:28

个回答

  • LX_Van
    2016-11-16 18:01:20
    已采纳

    是不是sql语句写错了

  • 疏影暗香4171408
    2016-11-16 18:39:51

    String sql=""+

           "insert into imooc_goddess"+

    "(user_name,sex,age,birthday,email,mobile,"+

    "create_user,create-date,update_user,update-date,isDel)"+

    "values(" +

    "?,?,?,?,?,?,?,current_date(),?,current_date(),?)";