美文网首页
查看所有表、表字段、表注释、字段注释

查看所有表、表字段、表注释、字段注释

作者: Mracale | 来源:发表于2020-07-18 15:30 被阅读0次

查看所有表和表注释

select
table_name,
table_comment
from
information_schema.tables
where
table_schema = '某数据库名称'

information_schema.tables: 表的字段信息

table_schema,table_name,create_time,update_time,check_time,table_comment

查看所有字段和字段注释

select
column_name,
column_comment
from
information_schema.columns
where
table_name = '表名'
and table_schema='数据库名'

INFORMATION_SCHEMA.Columns:列的信息

TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME, COLUMN_TYPE, COLUMN_KEY

相关文章

网友评论

      本文标题:查看所有表、表字段、表注释、字段注释

      本文链接:https://www.haomeiwen.com/subject/uzffkktx.html