I want to distinguish between a view and table. Basically, I want to find all the tables which has a particular column name.
select table_name from user_tab_columns x where column_name='STUDENTID';
The above query also returns views which have the same column. I tried using the following, however, I feel it take long time to run and return…
select table_name from user_tables where table_name in (select x.table_name from user_tab_columns x where x.column_name='PLAN_NAME');
any suggestions please.
I guess a join will be quicker than a subselect. Try this: