语法:

创建表时的COMMENT内容,要查看这些内容,使用命令:


show full fields from '表名称';

 查看tb_usr表字段注释:

MySQL 添加、查看字段注释

 

创建新表的脚本中, 可在字段定义脚本中添加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 '修改后的字段注释'; 

--注意:字段名和字段类型照写就行





相关文章:

  • 2021-12-18
  • 2022-12-23
  • 2021-12-27
  • 2021-06-24
  • 2021-06-04
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2021-09-24
  • 2021-05-17
  • 2022-02-02
相关资源
相似解决方案