表建立時添加註釋:spa
create table user(.net
id int not null default 0 comment '用戶id',blog
account varchar(20) not null default '' comment '用戶帳號',table
primary key (`id`),im
key `act` (`account`)註釋
) engine=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT '用戶表'tab
修改列註釋:di
alter table user modify column account varchar(20) comment '修改後的字段註釋';
--注意:字段名和字段類型照寫就行co
修改表註釋ps
alter table user comment '修改後的表的註釋';
查看註釋:
show FULL FIELDS FROM user
參考:https://blog.csdn.net/jhon_03/article/details/77920716