1、执行如下sql,查询出想要的表信息
select
c.table_name as 表名,
t.TABLE_COMMENT as 表名描述,
c.column_name as 字段名称,
c.column_type as 数据类型,
c.COLUMN_DEFAULT as 默认值,
if(c.column_key = 'PRI','Y','N') as 主键,
if(c.is_nullable='no','Y','N') as 非空,
c.column_comment as 注释
from
information_schema.columns c
left join
information_schema.tables t
on c.table_name=t.table_name
where c.TABLE_SCHEMA='XXXX' -- 指定库
and t.TABLE_SCHEMA='XXXX' -- 指定库
-- and c.table_name like 'abc_%' -- 我这里是导出以abc_开头的表
2、通过navicat将查询结果导出到excel 文章来源:https://uudwc.com/A/12B1q
3、按照这个网页方式,合并相同的表名excel合并相同内容的单元格-百度经验 (baidu.com)文章来源地址https://uudwc.com/A/12B1q