更改 MySQL 表以在列上添加注释
我一直在检查 MySQL ALTER TABLE 文档 并且它似乎不包括向列添加或修改注释的方法.我该怎么做?
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'
相关文章