Export word database format by navicat tool design documents

1. Open the database

1.1, open the database, execute the following query, the query a single table

The SELECT
COLUMN_NAME Code,
COLUMN_COMMENT name,
COLUMN_TYPE data type,
'to false' AS is a bond,
COLUMN_COMMENT Note
the FROM WHERE INFORMATION_SCHEMA.COLUMNS
- WX database name, the time you only need to be modified to export the database table structure can
table_schema = ' WX '
the aND - Article this article was as the table name, to be replaced when the name of the table you want to export
- if you do not write it, the default will check out all of the data in the table, so that might tell in the end is what fields in which tables of, so it is recommended to write the name of the name you want to export
table_name = 't_sys_info';

SELECT
TABLE_NAME 表名,
COLUMN_COMMENT 名称,
COLUMN_NAME 代码,
COLUMN_TYPE 数据类型,
'false' as 是键,
COLUMN_COMMENT 注释
FROM INFORMATION_SCHEMA.COLUMNS where table_schema ='data_service'AND 
table_name = 't_product';

1.2, open the database, execute the following query, the query multiple tables

The SELECT
TABLE_NAME table,
COLUMN_COMMENT name,
COLUMN_NAME codes,
COLUMN_TYPE data type,
'to false' AS is a bond,
COLUMN_COMMENT annotation
FROM INFORMATION_SCHEMA.COLUMNS where table_schema = 'database name';

2, export the query to a file or doc files can be xlxs

Guess you like

Origin www.cnblogs.com/zhangke306shdx/p/11084765.html