Oracle - How to search for a field name with a query


Basically, I wanted to quickly search a few hundred tables for any instances of a given column name.  If you use `select \*` you can get more fields like the data type, length, precision, etc.  Anyway, here’s the SQL for posterity:
select owner, table_name, column_name from all_tab_columns where column_name = 'ID'
select owner, table_name, column_name from all_tab_columns where column_name in ('ID', 'FNAME')

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.