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

Manually implement js SMS verification code input box

Preface This article records a common SMS verific...

MYSQL custom function to determine whether it is a positive integer example code

You can write a function: Mainly use regular expr...

vue cli3 implements the steps of packaging by environment

The vue project built with cli3 is known as a zer...

Summary of Common Letters in Unicode

Most of the earliest computers could only use ASC...

In-depth explanation of MySQL learning engine, explain and permissions

engine Introduction Innodb engine The Innodb engi...

How to update v-for in Vue

Tips: Array change method will cause v-for to upd...

How can MySQL effectively prevent database deletion and running away?

Table of contents Safe Mode Settings test 1. Upda...

How to define input type=file style

Why beautify the file control? Just imagine that a...

Let's talk about the performance of MySQL's COUNT(*)

Preface Basically, programmers in the workplace u...

Solve the problem of using linuxdeployqt to package Qt programs in Ubuntu

I wrote some Qt interface programs, but found it ...

Detailed explanation of Linux host name modification command

Linux change hostname command 1. If you only need...

JavaScript to achieve uniform animation effect

This article example shares the specific code for...

Detailed explanation of Vue login and logout

Table of contents Login business process Login fu...