Infolinks

Thursday, 21 June 2012

How To Search For a Table Using Specific Column Name in Oracle Database

How To Search For a Table Using Specific Column Name in Oracle Database

 
Questions: 

SQL Query To Search For A Particular Column Name In The Database.
SQL Query To Search For A Table Based On A Column Name In The Database.
How To Search For A Table Based On A Column Name In The Database.
How To Search For A Table Having A Particular column Name
SQL Query To Search For A Table Having A Specific Column Name.

Answer:

If you are a Developer or a DBA then you might have come across the above question very frequently in your professional Life.

Following is the simplest method to search for the tables containing a specific column names.

select table_name, column_name from all_tab_columns where column_name like '%X%';

*where X is the fist letter of the column name.

If you know the exact column name then use the following query.

select table_name, column_name from all_tab_columns where column_name ='SUBI

No comments:

Post a Comment