jeevan mummadi

jeevan mummadi

  • NA
  • 157
  • 0

How to fetch columns and table names from a view

Sep 24 2013 7:46 AM
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)