我的数据库栏目
  name            char  10
  num             int 
  sex             char
  cash            int
  ID              char
  add             char  100
  password        char我的SQL 语句  mysql  > update client set Add = "a" where name = "aa";  Add 这一栏 中 123 数据是存在的  而且 如果我换成其他的 栏目 比如cash  之类的 不报错   那句报错是:
   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 'Add = "a"' at line 1

解决方案 »

  1.   

    update client set `Add` = 'a' where name = 'aa';保留字问题 用反引号 `[align=center]====  ====
    [/align]
      

  2.   

     保留字 ADD, 所以要用`括起来。结贴吧[align=center]====  ====
    [/align]
      

  3.   

    不对啊。。 我UPDATE 还是这样子   刚刚试验的 select * from client 'add' = 'a' 就可以通过
      

  4.   

    update client set `Add` = 'a' where name = 'aa';
    `Add` 注意是引号[align=center]====  ====
    [/align]