I have a piece of data, in this case, Toyota
. I have 2 owners, foo
& bar
. Each owner has about completely different 50+ tables each. All I know is the data, Toyota
is in one or more of the 2 owner's tables. The challenge is, I am trying to find where Toyota
came from, from the database. How can I select the tables, column name, and owner which contains the data Toyota
?
I understand from context Toyota
is a car manufacture, so I was doing something like this, but then I have to manually check if that the particular table/column has the data Toyota
. Also what if the column name is car_man
, then my statement below completely doesn't work.
select table_name, column_name, owner
FROM all_tab_columns
where (owner = 'foo' or owner = 'bar')
and column_name LIKE '%manufacture%';