通过Navicat实现数据表自动生成数据字典

在Navicat中新建查询

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 = 'digital' and (T.TABLE_NAME='user_info')
digital 数据库名 ,user_info 数据表名
然后通过word导出即可

上图

posted on 2018-06-04 00:19  石墨方  阅读(643)  评论(0编辑  收藏  举报

导航