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

求帮忙查找sql insert into语句错误!!!

String sql=""+"insert into user_table (name,sex,keshi,jituanhao,group) values(?,?,?,?,?)";

提示: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 'group) values('ChenRenQiang','Man','CeShiYIShi',6915,'ShiJIngli')' at line 1.

SQL语句哪里出错了?

提问者:随便学学 2015-07-12 12:07

个回答

  • sd1700092
    2015-07-28 06:27:08

    为啥String sql前要加""+啊?直接开始insert不行么?

  • 随便学学
    2015-07-13 18:02:40

    查到了,group是关键字,不能用做字段名。