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 'sp_rename 'records.student_id', 'id', 'COLUMN'' at line 1.
帮助解决这个错误。
mysql> sp_rename 'records.student_id', 'id', 'COLUMN';
最佳答案
这样试试。没有引号。
ALTER TABLE records CHANGE student_id id INT(6) NOT NULL AUTO_INCREMENT;
关于mysql - 在 MySQL 中重命名表的列名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40805783/