Alter MySQL table to add comments on columns

后端 未结 5 1779
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 18:03

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?



        
5条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 18:17

    As per the documentation you can add comments only at the time of creating table. So it is must to have table definition. One way to automate it using the script to read the definition and update your comments.

    Reference:

    http://cornempire.net/2010/04/15/add-comments-to-column-mysql/

    http://bugs.mysql.com/bug.php?id=64439

提交回复
热议问题