1.查看获取表内字段注释:
> show full columns from tablename;或是 show full fields from tablename;或是,在元数据的表里面看Select COLUMN_NAME 列名, DATA_TYPE 字段类型, COLUMN_COMMENT 字段注释from INFORMATION_SCHEMA.COLUMNSWhere table_name = 'companies'##表名AND table_schema = 'testhuicard'##数据库名AND column_name LIKE 'c_name'##字段名2-1查看表注释的方法:
> show create table tablename;修改表的注释:
alter table test1 comment '修改后的表的注释';修改字段的注释:
alter table test1 modify column field_name int comment '修改后的字段注释';