查询所有表名

select table_name 
from 
information_schema.tables 
where 
table_schema='当前数据库'

查询所有表名及表注释

select
TABLE_NAME,
TABLE_COMMENT
from
INFORMATION_SCHEMA.Tables
where
table_schema = '某数据库名称'

查看所有字段和字段注释

select
COLUMN_NAME,
COLUMN_COMMENT
from
INFORMATION_SCHEMA.Columns
where
table_name = '表名'
and table_schema='数据库名'

更多推荐