Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

List table with common column set

SK KApr 7 2015 — edited Apr 7 2015

Hi Experts,

Database :- Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production.

I have to list out all tables that have both columns ST_NUM and ST_TYPE. If a table has only ST_NUM, then I do not want to display results. Similarly if the table has only ST_TYPE column  I do not want to display results. I need list of table as result that has both columns ST_NUM and ST_TYPE.

I tried below query :-

-- Did not give me proper results.

SELECT TABLE_NAME from dba_tab_columns where column_name =  'ST_NUM' and column_name ='ST_TYPE'

Appreciate help.

Thanks.

This post has been answered by Frank Kulash on Apr 7 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2015
Added on Apr 7 2015
2 comments
314 views