更改MySQL表以在列上添加注释 [英] Alter MySQL table to add comments on columns
本文介绍了更改MySQL表以在列上添加注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在查看 ALTER TABLE的MySQL文档,并且似乎没有提供向列添加或修改注释的方法.我该怎么办?
I have been checking the MySQL Documentation for ALTER TABLE and it does not seem to include a way to add or modify a comment to a column. How can I do this?
-- for table
ALTER TABLE myTable COMMENT 'Hello World'
-- for columns
-- ???
推荐答案
尝试:
ALTER TABLE `user` CHANGE `id` `id` INT( 11 ) COMMENT 'id of user'
这篇关于更改MySQL表以在列上添加注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文