Didn"t forge 2010-10-23 03:35 采纳率: 25%
浏览 642
已采纳

在 MySQL 中重命名列时出现错误

How do I rename a column in table xyz? The columns are:

Manufacurerid, name, status, AI, PK, int

I want to rename to manufacturerid

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)

转载于:https://stackoverflow.com/questions/4002340/error-renaming-a-column-in-mysql

  • 写回答

7条回答 默认 最新

  • 程序go 2010-10-23 04:08
    关注

    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;
    

    Remember :

    • Replace INT with whatever your column data type is (REQUIRED)
    • Tilde/ Backtick (`) is optional
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败