Mysql系列---【快速构建数据字典】

1.在Navicat中执行下面sql,把表名修改成自己的。

select COLUMN_NAME,DATA_TYPE ,COLUMN_COMMENT from (
select COLUMN_NAME,DATA_TYPE,COLUMN_COMMENT,table_name
from information_schema.COLUMNS 
where table_name in (
  'sgw_server_conf',
  'success_submit_area_report',
  'test_message_by_channel',
  'test_message_by_task',
  'test_message_mobiles',
  'test_message_mobiles_group'
)and table_schema ='sms_dev_demo'
and COLUMN_NAME = 'DETAIL'
#and COLUMN_COMMENT = '创建人'
) temp group by COLUMN_NAME,DATA_TYPE,COLUMN_COMMENT

2.查询结果如下:复制到你的Excel表格中

 

 3.自定义表头

 

至此,一份数据字典就完美收官了!

posted on 2020-01-01 10:45  少年攻城狮  阅读(960)  评论(0编辑  收藏  举报

导航