MySQL查询数据库中所有表名及注释等信息
查询所有表名select table_namefrominformation_schema.tableswheretable_schema='当前数据库'查询所有表名及表注释selectTABLE_NAME,TABLE_COMMENTfromINFORMATION_SCHEMA.Tableswheretable_schema = ‘某数据库名称‘查看所有字段和字段注释selectCOLUMN_NA
·
查询所有表名
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='数据库名'
更多推荐
已为社区贡献1条内容
所有评论(0)