语法:
创建表时的COMMENT内容,要查看这些内容,使用命令:
show full fields from '表名称';
查看tb_usr表字段注释:
创建新表的脚本中, 可在字段定义脚本中添加comment属性来添加注释:
create table test( id int not null default 0 comment '用户id' )
修改表的注释
alter table test1 comment '修改后的表的注释';
修改字段的注释
alter table test1 modify column field_name int comment '修改后的字段注释'; --注意:字段名和字段类型照写就行
如果觉得《MySQL 添加 查看字段注释》对你有帮助,请点赞、收藏,并留下你的观点哦!