Quering table names containing a value in any column
715303Jan 28 2010 — edited Jan 29 2010I searched a bit around this forum and found a solution for how to query the list of all tables
select table_name from user_tables;
However, I do not know how to do this -
I want to find the list of all table names where any of the fields in these tables should have the value containing a number in it.
Say for example I have a database containing many tables Students, Teachers, Principals and many other such 100+ tables. I want to find the list of all tables names which contain the word "ohn" in any of their fields. The string "ohn" MAY be in Employees table under First Name field as John and in Teachers under Nick Name field as Johnny, etc.
So, I do not know what are the columns/field names. I only know that the value of any of these columns will contain the string "ohn" (like '%ohn%'). Now, how do I write a query for this which will give me the table names?
Please assist!