Re: Finding the definition of a view

From: Glenn Kerr <KERRG_at_TIMKEN.COM>
Date: 1996/01/30
Message-ID: <1771E6A67S86.KERRG_at_TIMKEN.COM>#1/1


In article <4ej7da$sm7_at_big.info.att.com> Daniel Lieuwen <lieuwen> writes:  

>
>Assuming one has DBA priveleges, how does one find the definition of a
>view? No one remembers the exact definition off hand, and we need it back.
>
>Also, where can one find a complete list of system table (e.g. TABS, COLS)?
>Since they don't show up in TABS itself and I can't find even TABS and COLS
>in the indexes of any of the stack of about 10 books that came with the
>distribution, I'm out of ideas as to where to look.
>
>Thanks.
>
>Daniel
>
Daniel,  

In sql*plus, enter
set long 3000
select text from dba_views where owner = :owner

   and view_name = :view;  

This will return the view definition (up to 3000 characters).  

As far as querying the system tables, Oracle supplies three sets of views with the prefixes DBA_, ALL_, and USER_. These are documented in the Oracle 7 Server Administrator's Guide.  

Glenn Kerr
kerrg_at_timken.com Received on Tue Jan 30 1996 - 00:00:00 CET

Original text of this message