sql语句错误 – 关键字作为字段名

2010年7月15日 | 标签:

Eclipse出现了这样一个错误

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…..

insert into cms_user (username,password,group) values (”zz111″,”bb111″,”1″)

这样就会报错。group是sql关键字,改成

insert into cms_user (username,password,usergroup) values (”zz111″,”bb111″,”1″)

就没问题了

  1. 足家堂
    2010年7月24日22:21

    努力学习,争取把我的博客做的跟博主一样棒。

  2. 2010年12月3日11:01

    好东西,顶起来

  3. 2010年12月23日14:27

    好有技术,博主的博客里面的博文都这么的有技术性。

  4. 2010年12月24日16:07

    过来看看,祝博主圣诞快乐!