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.自定义表头
至此,一份数据字典就完美收官了!
愿你走出半生,归来仍是少年!