MySQL查询数据库所有表名及其注释
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
1 查询 数据库 所有表
select table_name
from
information_schema.tables
where
table_schema='sdam'
2 查询数据库所有表 和表的 注释
SELECT TABLE_NAME, TABLE_COMMENT
from information_schema.tables
WHERE TABLE_SCHEMA = 'dam'
ORDER BY TABLE_NAME;
3 查询数据库 单个表名所有表 注释
SELECT
COLUMN_NAME 字段,column_comment 中文,COLUMN_Type as 类型 ,column_key 主键,
IS_NULLABLE 可空,EXTRA 备注
FROM
INFORMATION_SCHEMA.COLUMNS
where
table_schema ='sdam' AND table_name = 'table-name';