Home » SQL & PL/SQL » SQL & PL/SQL » URGENT - How to find the master table for a view
URGENT - How to find the master table for a view [message #213506] Thu, 11 January 2007 00:54 Go to next message
svik
Messages: 16
Registered: April 2005
Location: MRU
Junior Member
Hello..

For oracle version 9.2.0.6.0, i want to know if it is possible to know the master table of a particular view.. for example view V, from which tables is it derived from?

Thanks.
Re: URGENT - How to find the master table for a view [message #213509 is a reply to message #213506] Thu, 11 January 2007 01:13 Go to previous messageGo to next message
Littlefoot
Messages: 20894
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I think that you'll have to check it "manually":
SQL> set long 4000
SQL> select text from user_views where view_name = 'VIEW_NAME';
Re: URGENT - How to find the master table for a view [message #213521 is a reply to message #213509] Thu, 11 January 2007 02:05 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You can check USER_DEPENDENCIES for this information.
SELECT * 
FROM   USER_DEPENDENCIES 
WHERE  TYPE = 'VIEW' 
AND    NAME = <view_name
AND    referenced_type = 'TABLE';
Re: URGENT - How to find the master table for a view [message #213528 is a reply to message #213521] Thu, 11 January 2007 02:33 Go to previous message
Littlefoot
Messages: 20894
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Thank you! Today I've learned something new!
Previous Topic: UTL_SMTP attached file ends with blank line
Next Topic: Oracle Trigger equivalent to SQLServer Trigger
Goto Forum:
  


Current Time: Mon Dec 05 08:58:46 CST 2016

Total time taken to generate the page: 0.12617 seconds