MySQL database queries table names in many tables

Source: Internet
Author: User

The following articles mainly describe how to query table names and field names in a number of tables in the MySQL database, as well as the SQL statements used for the query, there are also two actual solutions. The following describes the main content of the article.

Query the SQL statement of a table name or field name in multiple MySQL tables:

 
 
  1. SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE 'Name'; 

MySQL Databases query table names and field names in many tables. You can also find the following two methods:

 
 
  1. SELECT column_name from information_schema.columns WHERE column_name LIKE ’
    %searchTerm%’ AND table_schema = ‘yourDB’  
  2. SELECT column_name from information_schema.columns WHERE column_name LIKE ’
    %searchTerm%’ AND table_schema = ‘yourDB’ AND table_name = ‘yourDBTable’  

In this way, we will not be lost when there are so many tables suddenly appearing.


The above content describes how to query the table name and field name of the MySQL database in many tables. I hope it will help you in this regard.

Related Article

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.