xuyangus 发表于 2016-10-24 06:06:45

用sql语句取出mysql 数据库中表的字段的说明信息

  如
表 user
有如下字段
name
company
sex
  为字段分别添加说明(comment)为
姓名
公司名称
性别

  show full columns from your_table;
  或者:
select COLUMN_COMMENT from information_schema.COLUMNS
where
concat_ws('.',TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME) = '<your_schema>.<your_table>.<your_column>'



  Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=492256
页: [1]
查看完整版本: 用sql语句取出mysql 数据库中表的字段的说明信息