一、字段注释

1、获取表注释

select COLUMN_COMMENT as comment from INFORMATION_SCHEMA.COLUMNS where table_name = '表名称' and column_name = '字段名称' and table_schema = '数据库名称'

2、修改表注释

alter table 表名称 modify column 字段名称 字段类型 comment 注释

二、表注释

1、获取表注释

show table status from 数据库名称 like '表名称'

得到的是一个数组,取Comment即可

2、修改表注释

alter table 表名称 comment 修改后的表的注释

相关文章:

  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-12-23
  • 2021-06-16
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-11-14
  • 2021-12-31
相关资源
相似解决方案