mysql数据库表结构导出到Excel中——利用HeidiSQL

直接上sql

select column_name as 字段,
     column_type as 数据类型,
     data_type as 字段类型,
     character_maximum_length as 长度,
     is_nullable as 是否为空,
     column_default as 默认值,
     column_comment as 备注
from
     information_schema.columns
where
     table_schema = '数据库名称' and table_name = '表名称'

将“数据可名称”和“表名称”改为自己要导出的数据库名称和表名称即可,结果如下:

右键选择“导出表格的行”,跳出下面的会话框

搞定!

 

posted on 2021-06-30 23:01  viaviaYeyuan  阅读(3529)  评论(0)    收藏  举报