简体   繁体   中英

parse error on alter table in MySQL using MAMP

I am using MAMP with MySQL server ver 5.5.42.

When I do an Alter table using phpMyAdmin on the MAMP server:

ALTER TABLE config DROP COLUMN 132

I get

#1064 - 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 'config' DROP COLUMN 132' at line 1

Where is the problem ?

Turns out it should be:

ALTER TABLE `config` DROP COLUMN `132`

`--> the accent or backquote character on the tilde key. :|

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM