select table using column name mysql code example
Example 1: get table which have specific columns in mysql
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('columnA','ColumnB')
AND TABLE_SCHEMA='YourDatabase';
Example 2: mysql select all table that have field names
SELECT DISTINCT
TABLE_NAME
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
COLUMN_NAME IN('column1', 'column2')
AND TABLE_SCHEMA = 'schema_name';