[英]parse error on alter table in MySQL using MAMP
I am using MAMP with MySQL server ver 5.5.42.我正在将 MAMP 与 MySQL 服务器版本 5.5.42 一起使用。
When I do an Alter table using phpMyAdmin on the MAMP server:当我在 MAMP 服务器上使用 phpMyAdmin 做一个 Alter 表时:
ALTER TABLE config DROP COLUMN 132
I get我得到
#1064 - You have an error in your SQL syntax;
#1064 - 你的 SQL 语法有错误; check the manual that corresponds to your MySQL server version for the right syntax to use near 'config' DROP COLUMN 132' at line 1
检查与您的 MySQL 服务器版本相对应的手册,以获取在第 1 行的“config”DROP COLUMN 132' 附近使用的正确语法
Where is the problem ?问题出在哪儿 ?
Turns out it should be:结果应该是:
ALTER TABLE `config` DROP COLUMN `132`
`--> the accent or backquote character on the tilde key. `--> 波浪号键上的重音或反引号字符。 :|
:|
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.