How to export mysql table structure to excel

How to export mysql table structure to excel

The requirements are as follows

Export the table structure, field comment information, table name, etc. This can be achieved without using third-party tools.

SELECT
 TABLE_NAME table name,
 COLUMN_NAME column name,
 COLUMN_TYPE data type,
 DATA_TYPE field type,
 CHARACTER_MAXIMUM_LENGTH length,
 IS_NULLABLE Is it empty?
 COLUMN_DEFAULT default value,
 COLUMN_COMMENT Comments FROM
 INFORMATION_SCHEMA.COLUMNS
where
-- developerclub is the database name. You only need to change it to the database you want to export the table structure. table_schema = 'developerclub' 

The effect is as follows

I'm too lazy to change them one by one, the effect has been achieved.

The above is the details of how to export the table structure of MySQL to Excel. For more information about exporting the table structure of MySQL to Excel, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Solution to MySQL error TIMESTAMP column with CURRENT_TIMESTAMP
  • How to solve the problem of entering current root password when installing MYSQL
  • Various types of MySQL indexes
  • How to modify the MySQL character set
  • Troubleshooting of master-slave delay issues when upgrading MySQL 5.6 to 5.7
  • Solution to MySQL Chinese garbled characters problem
  • How to install MySql in CentOS 8 and allow remote connections
  • Analyzing the MySql CURRENT_TIMESTAMP function by example

<<:  There is no make command in Linux (make: *** No target specified and no makefile or make command installation method found)

>>:  How to use Vue3 to achieve a magnifying glass effect example

Recommend

Detailed explanation of Mysql transaction isolation level read commit

View MySQL transaction isolation level mysql> ...

js canvas realizes slider verification

This article example shares the specific code of ...

MySQL foreign key constraint (FOREIGN KEY) case explanation

MySQL foreign key constraint (FOREIGN KEY) is a s...

How to get datetime data in mysql, followed by .0

The data type of MySQL is datetime. The data stor...

Solve the problem of PhPStudy MySQL startup failure under Windows system

Report an error The Apache\Nginx service started ...

Steps of an excellent registration process

For a website, it is the most basic function. So l...

Vue commonly used high-order functions and comprehensive examples

1. Commonly used high-order functions of arrays S...

jQuery Ajax chatbot implementation case study

Chatbots can save a lot of manual work and can be...

Summary of some tips on MySQL index knowledge

Table of contents 1. Basic knowledge of indexing ...

About the layout method of content overflow in table

What is content overflow? In fact, when there is ...

AsyncHooks asynchronous life cycle in Node8

Async Hooks is a new feature of Node8. It provide...

How to install Nginx in a specified location in Centos system

How to install Nginx in a specified location in C...

MySQL series tutorials for beginners

Table of contents 1. Basic concepts and basic com...

How to find the specified content of a large file in Linux

Think big and small, then redirect. Sometimes Lin...

VMware kali virtual machine environment configuration method

1|0 Compile the kernel (1) Run the uname -r comma...