最近get到一个新技能,利用navicat可以快速生成数据字典。
1)运行sql语句,查询出对应表的字段注释
USE information_schema;
SELECT
C.COLUMN_NAME AS '字段名',
C.COLUMN_TYPE AS '数据类型',
C.IS_NULLABLE AS '允许为空',
C.EXTRA AS 'PK',
C.COLUMN_COMMENT AS '字段说明'
FROM
COLUMNS C
INNER JOIN TABLES T ON C.TABLE_SCHEMA = T.TABLE_SCHEMA
AND C.TABLE_NAME = T.TABLE_NAME
WHERE
T.TABLE_SCHEMA = 'users' and T.TABLE_NAME='passport_log'
结果如下图:
2)导出成world文档
3)打开word文档,查看内容
尊重作者原创,附上原文链接: https://blog.csdn.net/maquealone/article/details/60764420