Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Table Info Help

Re: Table Info Help

From: Mark D Powell <mark.powell_at_eds.com>
Date: 16 Aug 2001 06:41:39 -0700
Message-ID: <178d2795.0108160541.6d0b63fa@posting.google.com>


"Twin" <tweeting100_at_hotmail.com> wrote in message news:<997875513.477662_at_ernani.logica.co.uk>...
> Hi,
>
> How do I retrieve information about tables within Oracle instead of
> looking at the build script? For example:
>
> If I wanted to know the foreign keys of a particular table and where
> they are pointing to, how do I go about doing this ? I'm sick of having
> to use another terminal window to view the various build scripts
> whenever I want this information - surely there's an easier way within
> Oracle itself ?
>
> Thanks in advance.
>
> --

What you want to do is become familiar with the Oracle rdbms dictionary tables (really views).

In general there are 3 sets of dictionary views that follow the following pattern:

user_x show you all x you own
all_x show you all x that you have privilege to access dba_x show all x in database

examples
all_tables, all_views, all_indexes, all_constraints, all_synonyms, all_tab_columns (notice there appears to be a dictionary view for every kind of object)

From SQL*Plus you can issue a 'desc table_name' to see a list of available columns for any table you have access to select against.

You can 'select * from dictionary' to get a list of the dictionary views and the dynamic performance tables.

You can find the dictionary and dynamic performance views documented in the Oracle version# Reference manual.

For your specific question look at dba_constraints.

Received on Thu Aug 16 2001 - 08:41:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US