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

Comparison of the advantages of vue3 and vue2

Table of contents Advantage 1: Optimization of di...

XHTML Basic 1.1, a mobile web markup language recommended by W3C

W3C recently released two standards, namely "...

The process of installing Docker in Linux system

In this blog, I will walk you through the process...

Vue implements tab navigation bar and supports left and right sliding function

This article mainly introduces: using Vue to impl...

Simple CSS text animation effect

Achieve results Implementation Code html <div ...

Vue song progress bar sample code

Note that this is not a project created by vue-cl...

Summary of common commands for building ZooKeeper3.4 middleware under centos7

1. Download and decompress 1. Introduction to Zoo...

How to change apt-get source in Ubuntu 18.04

When using apt-get to install, it will be very sl...

Detailed explanation of chmod command usage in Linux

chmod Command Syntax This is the correct syntax w...

The best way to solve the 1px border on mobile devices (recommended)

When developing for mobile devices, you often enc...

Let's talk about the characteristics and isolation levels of MySQL transactions

The Internet is already saturated with articles o...

Analysis of the use and principle of Docker Swarm cluster management

Swarm Cluster Management Introduction Docker Swar...

Detailed explanation of custom events of Vue components

Table of contents Summarize <template> <...

MySQL online DDL tool gh-ost principle analysis

Table of contents 1. Introduction 1.1 Principle 1...

Learn MySQL index pushdown in five minutes

Table of contents Preface What is index pushdown?...