mysql: documentation for table attributes
Is there a way to attach d开发者_JAVA百科ocumentation / comments to tables and attributes in mysql?
It's so natural to be able to document db attributes as you're documenting class properties.
Yes, you can add comments to columns in MySQL:
alter table pancakes change house house int comment 'where is?'
And then you can view them with show full columns
:
The FULL keyword causes the output to include the column collation and comments, as well as the privileges you have for each column.
Comments are fairly spacious now, they used to be pretty small:
A comment for a column can be specified with the COMMENT option, up to 1024 characters long.
精彩评论