查看所有表和表注释
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