I have a schema (Main schema) with a list of available tables. Each table has a column which I want to check if it is there.
For example:
TheMainSchema:
table1
table2
table3
table4
table5
Sample of tables:
table1:
Id Row i_am_important
____ _____ ______________
1 row1 row1
2 row2 row2
table2:
Id Row i_am_important
____ _____ ______________
1 row1 row1
2 row2 row2
table3:
Id Row else
____ _____ ______________
1 row1 row1
2 row2 row2
The query looks for the important column, if it is there it means the results should be returned.
In this case the query's output would be: table1,table2