如何重命名表 xyz
中的列?列是:
How do I rename a column in table xyz
? The columns are:
Manufacurerid, name, status, AI, PK, int
我想重命名为manufacturerid
我尝试使用 PHPMyAdmin 面板,但出现此错误:
I tried using PHPMyAdmin panel, but I get this error:
MySQL said: Documentation
#1025 - Error on rename of '.\shopping\#sql-c98_26' to '.\shopping\tblmanufacturer' (errno: 150)
Lone Ranger 非常接近...其实你还需要指定重命名列的数据类型.例如:
Lone Ranger is very close... in fact, you also need to specify the datatype of the renamed column. For example:
ALTER TABLE `xyz` CHANGE `manufacurerid` `manufacturerid` INT;
记住:
这篇关于重命名 MySQL 中的列时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!