Find Table by Field Name in Oracle
5/31/2006 by ITtoolbox Popular Q&A Team
ITtoolbox as adapted from Oracle-SQL-L discussion group
Can anyone suggest some simple method to identify all tables/views where a field is used?
Disclaimer: Contents are not reviewed for correctness and are not endorsed or recommended by ITtoolbox or any vendor. Popular Q&A contents include summarized information from Oracle-SQL-L discussion unless otherwise noted.
1. Adapted from response by Aji George on 5/17/2006
select * from user_tab_columns where column_name=''
This will search the given column in the tables and returns the details.
2. Adapted from response by chris.evans on 5/17/2006
USER_TAB_COLUMNS is a good start. Also try ALL_TAB_COLUMNS and DBA_TAB_COLUMNS, these show objects that you may need but don't have access to.
3. Adapted from response by itkina on 5/17/2006
try "select * from data_dictionary" to see all dictionaries.
Also the following views can help:
all_constraints (user_constraints, dba_constraints), all_indexes, all_tables, all_tab_columns
Disclaimer: Contents are not reviewed for correctness and are not endorsed or recommended by Toolbox.com or any vendor.
Popular Q&A contents include summarized information from Oracle T-SQL discussion unless otherwise noted.