SELECT
column_name,
column_type,
is_nullable,
COLUMN_DEFAULT,
column_comment
FROM
information_schema.COLUMNS
WHERE
table_schema = 'think-water-dma-klmy'
AND table_name = 'tw_dma_meter_dfn';
第一个为数据库名 第二个为表名
选择工具导出为excel
excel转word
http://www.docpe.com/excel/excel-to-word.aspx
在调整下格式就可以了
oracle
SELECT
A.COLUMN_NAME AS "字段名",
A.DATA_TYPE AS "字段类型",
A.CHAR_LENGTH AS "字段长度",
A.NULLABLE AS "能否为空",
B.comments AS "备注"
FROM
all_tab_columns A,
DBA_COL_COMMENTS B
WHERE
A.owner = B.owner
AND A.table_name = B.table_name
AND A.COLUMN_NAME = B.COLUMN_NAME
AND A.owner = 'C##DMA'
AND a.TABLE_NAME = 'TW_DMA_METER_INFO' ;
然后选择导出结果即可