mysql 关键字出错 处理方法

来源:互联网 发布:聊城大学网络教育 编辑:程序博客网 时间:2024/05/20 03:47

里面有一个表add,使用 select * from add;
出现错误:[b]error 1064(42000):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' at line 1[/b]

如果你有一张add的表,add在mysql是关键字,你查的时候写上 select * from 'add'

是反引号,不是单引号,应该是数字1键旁边那个。呵呵

原创粉丝点击