要对一堆乱七八糟的数据库进行文档整理,实在是头大。有没有能快速生成文档的工具。
2
815979670 332 天前 1
我之前写过一个 php 脚本,读取数据库表结构生成 markdown 的,https://www.dbkuaizi.com/archives/97.html
|
3
NeverBelieveMe OP @ash1n2 想要的是 word 文档。
|
4
SmartTom 332 天前 1
|
5
orisine 332 天前 1
|
6
Dongxiaohao 332 天前 via Android
@NeverBelieveMe 我记得 Java 这边是专门有工具类 直接生成 word 文档 里面会把字段的注释 名字类型什么的都写出来
|
8
luobingit 332 天前
码猴.PDMReader
|
9
lenmore 331 天前 2
MySQL 可以试下这个,以前写的应付检查的……
导出成 excel ,去掉表头就行了。 SET @table_schema='test'; SELECT column_name, DATA_TYPE, COLUMN_COMMENT FROM ( SELECT table_name, '' AS column_name, '' AS DATA_TYPE, '' AS COLUMN_COMMENT, -4 AS ORDINAL_POSITION FROM information_schema.tables WHERE table_schema=@table_schema UNION SELECT table_name, CONCAT('表名:', table_name) AS column_name, '' AS DATA_TYPE, '' AS COLUMN_COMMENT, -3 AS ORDINAL_POSITION FROM information_schema.tables WHERE table_schema=@table_schema UNION SELECT table_name, CONCAT('用途:', table_comment) AS column_name, '' AS DATA_TYPE, '' AS COLUMN_COMMENT, -2 AS ORDINAL_POSITION FROM information_schema.tables WHERE table_schema=@table_schema UNION SELECT table_name, '字段名' AS column_name, '字段类型' AS DATA_TYPE, '描述' AS COLUMN_COMMENT, -1 AS ORDINAL_POSITION FROM information_schema.tables WHERE table_schema=@table_schema UNION SELECT table_name, column_name, CONCAT(DATA_TYPE, CASE WHEN CHARACTER_MAXIMUM_LENGTH IS NOT NULL THEN CONCAT('(', CHARACTER_MAXIMUM_LENGTH, ')') WHEN NUMERIC_PRECISION IS NOT NULL THEN CONCAT('(',NUMERIC_PRECISION, CASE WHEN NUMERIC_SCALE>0 THEN CONCAT(',',NUMERIC_SCALE) ELSE '' END , ')') WHEN DATETIME_PRECISION > 0 THEN CONCAT('(', DATETIME_PRECISION, ')') ELSE '' END) AS DATA_TYPE, COLUMN_COMMENT,ORDINAL_POSITION FROM information_schema.columns WHERE table_schema=@table_schema ) AS t ORDER BY table_name, ORDINAL_POSITION; |
10
wuyiccc 331 天前
screw
|
11
canonlemon 331 天前 1
PDManer ,可以逆向解析数据库,导出 Word 文档
|
14
nerkeler 329 天前 via Android
前两天也在找,找到个 database-export ,就是表多了就不好用了
|