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:
- 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:
- SELECT column_name from information_schema.columns WHERE column_name LIKE ’
%searchTerm%’ AND table_schema = ‘yourDB’
- 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.