这让我发疯!
我想在我的博客表中将一列从 read-more 重命名为 read_more
我尝试了所有这些:
ALTER TABLE blog RENAME COLUMN read-more to read_more;
ALTER TABLE blog CHANGE COLUMN 'read-more' 'read_more' VARCHAR(255) NOT NULL;
Run Code Online (Sandbox Code Playgroud)
我总是得到这个!
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 'COLUMN read-more to read_more' at line 1
Run Code Online (Sandbox Code Playgroud)
我正在使用 MySQL 5.5