2
Reply

How to fetch columns and table names from a view

jeevan mummadi

jeevan mummadi

Sep 24 2013 7:46 AM
1k
Hi All,

I want to fetch columns,tables names from a view. And I have to map those columns related to that tables.

Fetching columns from view
-----------------------------------
SELECT column_name,
data_type
FROM user_tab_columns
WHERE table_name = 'MY_VIEW'

Fetching tables from view
----------------------------------
select name , type , referenced_name , referenced_type
from user_dependencies where name = 'MY_VIEW' and type = 'VIEW' and
referenced_type = 'TABLE'


can you please anyone help me how to map those columns to related tables.

Regards,
Jeevan.

Answers (2)