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

Home -> Community -> Usenet -> c.d.o.server -> Re: Primary key

Re: Primary key

From: Peter van Rijn <p.vanrijn-rmthis_at_zhew.nl>
Date: Tue, 10 Sep 2002 09:52:06 +0200
Message-ID: <unr95dhnv6rsfd@corp.supernews.com>

Alejandro,

Oracle has all kinds of nice views in the database to be able to take a look at the sort of things you're looking for. In the Oracle Reference Manual (tahiti.oracle.com) all views are described. A few examples:

USER_TABLES --> all tables in your schema
ALL_TABLES --> all tables you're allowed to take a look at
DBA_TABLES --> all tables (if you have sufficient privileges)

USER_TAB_COLUMNS --> describes the columns of the tables in your schema ALL_TAB_COLUMNS ...etc,etc.

Primary keys can be found in USER_/ALL_/DBA_CONSTRAINTS, CONSTRAINT_TYPE='P'. hth,
Peter

"Alejandro Narancio" <a_narancio_at_hotmail.com> schreef in bericht news:72a8c532.0209092037.50750113_at_posting.google.com...
> Hello, first of all excuse me for my english.
> I have a question, how can i get the catalog of a database using SQL???
>
> I need get the primary key of a table and the types of the fields.
>
> Thanks,
>
> Alejandro
Received on Tue Sep 10 2002 - 02:52:06 CDT

Original text of this message

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