Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Finding KEY information from schema tables ?
For Oracle, this info is stored in dba_indexes (for all users) and user_indexes for the session owner. Describe the views to get the column names. You can also look at dba_constraints / dba_cons_columns and user_constraints and user_cons_columns to get constraint info, such as primary key and unique constraints.
Roger Snowden
Winton Davies <wdavies_at_cs.stanford.edu> wrote in article
<wdavies-1102981404110001_at_semantics.stanford.edu>...
> Hi,
>
> How can I recover schema information (such as Primary Key's , COmposite
> Keys, Secondary Keys and so on?) from both Oracle and Sybase systems ?
>
> I've been looking at ODBC, and can see no function that does this. I'm
> assuming this information is stored in proprietary system tables, but a
> cursory look at a stack of documentation yield no leads....
>
> Thanks a million,
> Winton
>
> --
> -----------------------------------------------------------
> E-Mail: wdavies_at_cs.stanford.edu (Winton Davies)
> WWW: http://www.csd.abdn.ac.uk/~wdavies/wdavies.html
> Telephone OFFICE: 1-415-725-7469 (USA) FAX: 1-415-725-7411
> Address: Room 206, Gates, Stanford University, CA 94305, USA
>
>
Received on Thu Feb 12 1998 - 00:00:00 CST
![]() |
![]() |