mysql給屬性添加注釋的示例:
mysql創建新表的腳本時添加。
create table test(id int not null default 0 comment '用戶id')
id int not null default 0 comment '用戶id'
)
如果是已經建好的表,可修改字段的命令,然后加上comment屬性定義即可。
alter table testchange column id id int not null default 0 comment '測試表id'
change column id id int not null default 0 comment '測試表id'