A statement homemade data dictionary

Source: Internet
Author: User

If some children's shoes have the need to make a data dictionary to Excel, refer to the SQL I provided.

SELECT TABLE_SCHEMA database name, TABLE_NAME table name, column_name field name, Column_type field type, is_nullable nullable, column_default default, case when column_key= ' PRI ' then ' primary key ' when column_key= ' MUL ' then ' normal index ' ELSE ' None ' END index information, column_comment comment from INFORMATION_SC Hema. Columnswhere table_schema (' MySQL ', ' information_schema ', ' Performance_schema ') ORDER by table_name

Shown below

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/36/wKioL1T6oazxaaSYAARKG-orzOM798.jpg "title=" Baidushurufa_2015-3-7_14-53-48.png "alt=" Wkiol1t6oazxaasyaarkg-orzom798.jpg "/>

You can export the result set to Excel, which can be used as a data dictionary for proper processing.

This article is from the "original" blog, please be sure to keep this source http://imysqldba.blog.51cto.com/1222376/1618242

A statement homemade data dictionary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.