Home > Database > Mysql Tutorial > How does mysql export table fields and related attributes (with examples)

How does mysql export table fields and related attributes (with examples)

不言
Release: 2019-01-26 11:09:23
forward
3825 people have browsed it

The content of this article is about how mysql exports table fields and related attributes (with examples). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

You need to export the fields and attributes of the table in the database, make a table and save it in word

First find the library you want to import, and enter sql

on the query page
SELECT
  COLUMN_NAME 列名,
  COLUMN_TYPE 数据类型,
    DATA_TYPE 字段类型,
  CHARACTER_MAXIMUM_LENGTH 长度,
  IS_NULLABLE 是否为空,
  COLUMN_DEFAULT 默认值,
  COLUMN_COMMENT 备注
FROM
 INFORMATION_SCHEMA.COLUMNS
where
table_schema ='库名'
AND
table_name  = '表名'
Copy after login

Get the result

Then copy, you can copy the result

Note , what is copied is the content, there is no table header and table format, you need to draw a table of appropriate size on Word, and then paste the data into it

The above is the detailed content of How does mysql export table fields and related attributes (with examples). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template