日期:2014-05-16  浏览次数:20638 次

各位大神看一看吧,这个错误我调一天了。。。SQL的修改语句

  小弟我在做一个简单的软件耍,不知道为什么MYSQL老是报错:


SQL语句:
update peopleresource set gx ='家庭成员' ,tel = ' ',fixed_tel = ' ',e_mail = ' ',qq = ' ',area = ' ',like = ' ',taboo = ' ',birthday = ' ',remarke=' ' where name='22'  


错误反馈:
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 'like = ' ',taboo = ' ',birthday = ' ',remarke=' ' where name='22'' at line 1

数据库的表:



------解决方案--------------------
UPDATE peopleresource SET gx ='家庭成员' ,tel = ' ',fixed_tel = ' ',e_mail = ' ',qq = ' '
,AREA = ' ',`LIKE` = ' ',taboo = ' ',birthday = ' ',remarke=' ' WHERE `NAME`='22'
------解决方案--------------------
有保留字加``
------解决方案--------------------
关键字最好是不要作为列名啊 
一定要加就得加上 键盘1左边的 `