I have now:
SELECT TABLE_SCHEMA , TABLE_NAME , COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'NNN';
This gives me several hundreds of rows, because several tables contain field with that name. I want to search some value from these tables and columns by using the previous data in new query like:
SELECT <COLUMN_NAME> FROM <TABLE_SCHEMA>.<TABLE_NAME>
Could I include the results of the first query to the tags in second one in one query and how? I would like to avoid calling the every schema, table and column by hand to check only minor things in every table.
I took the first query from: https://stackoverflow.com/questions/420741/getting-list-of-tables-and-fields-in-each-in-a-database