MySQL-重命名列 [英] MySQL - Rename Column
本文介绍了MySQL-重命名列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在我的表tbl_help
mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content;");
推荐答案
您必须在change column语句中包括该列的定义(不确定原因,但这就是文档中所说的内容).
You've got to include the definition of the column in the change column statement (not sure why, but that's what the documentation says.)
所以这应该起作用:
mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content VARCHAR(200) ;");
这篇关于MySQL-重命名列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文