1.创建表时添加表已经字段的备注,如下:

create table t_table (

d int primary key comment '主键'

) comment = 'table表';

2.表已经创建完毕,此时添加对表的备注

alter table table_name comment '备注信息';

3.添加对字段的备注

alter table table_name modify column c_name varchar(30) not null comment '备注信息';

备注:我们在这里添加对字段的备注信息时,不要只顾着写其备注而忽略了字段的完整定义,如类型,属性...

更多推荐

MySql 添加表或字段的备注信息