Home » SQL & PL/SQL » SQL & PL/SQL » related to views
related to views [message #153798] Wed, 04 January 2006 03:44 Go to next message
jampana_anil
Messages: 8
Registered: August 2005
Junior Member
i want how to see all the views that are created for particular table
Re: related to views [message #153809 is a reply to message #153798] Wed, 04 January 2006 04:18 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Views are not 'created for a particular table', they are stored SQL queries. So, I'm afraid that the only option you have is to search the view text in USER/ALL/DBA_VIEWS. But, as the TEXT column in this dictionary view(s) is a LONG, you cannot query it directly. Use a function like this one.

MHE
Re: related to views [message #153817 is a reply to message #153809] Wed, 04 January 2006 04:40 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
query user_dependencies (or all_ or dba_...):
select name
from   user_dependencies
where  type = 'VIEW'
and    referenced_name = '<your table>'


hth
Re: related to views [message #153820 is a reply to message #153817] Wed, 04 January 2006 04:52 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
LOL, totally forgot about that. I knew I was missing something.

Excellent Frank!

MHE
Previous Topic: pl/sql : simple
Next Topic: How to query from all_views based on TEXT field
Goto Forum:
  


Current Time: Tue Sep 09 08:07:56 CDT 2025