I have multiple tables with with varying names for the same piece of data. For example, day
vs business_day
. I'd like to identify what column names exist for which table. I think this can be done using schema information, but I'm not familiar with it.
For simplicity, the tables below are 3 separate tables with these column names.
table_1
day city weather
table_2
business_day location status
table_3
day city rain
Where day
and business_day
and city
and location
are the same piece of information, but unfortunately different naming conventions so I wouldn't be able to use the same selection criteria in a WHERE
clause. I'd like to search the table information to see which tables have day
or business_day
and city
or location
. The other columns are not important to me in this example. How can I identify table information in this way?
information_schema
has something to do with the answer; did you try anything?