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!

Filter table name by passing column name to all_tab_columns

SuneelOct 20 2015 — edited Oct 20 2015

Hi All,

I have three tables test1, test2 and test3

test1 columns are deptno,dname,loc

test2 columns are empno,deptno,etc

test3 columns are empno,deptno,etc

my requirement is based on column name get the table name

Here if i pass column name as deptno i will get all 3 tables 

But i will pass combination like deptno,dname then i should get only one table

i tried below query but i am getting all the tables

  select * from all_tab_columns where cname IN ('DEPTNO','DNAME')

Can any body please help me out?

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2015
Added on Oct 20 2015
6 comments
1,193 views