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: Finding KEY information from schema tables ?

Re: Finding KEY information from schema tables ?

From: Paul Tomko <tomko_at_news.xnet.com>
Date: 1998/02/12
Message-ID: <6bv6ml$3g9@typhoon.xnet.com>#1/1

In article <wdavies-1102981404110001_at_semantics.stanford.edu>, Winton Davies <wdavies_at_cs.stanford.edu> wrote:
>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....
>

In Sybase, you can get this information from the syskeys table. It can be linked to the table by the 'id' column.

Many people don't define their primary and foreign keys. For primary keys, you can guess the key based on a unique clustered index on the table. This information can be found in the sysindexes table.

Paul

-- 
Paul Tomko                     | P.O. Box 1382
President                      | Bolingbrook, Illinois 60440 
Tomko Consulting, Incorporated | (630) 759-8799             
tomko@xnet.com                 | http://www.xnet.com/~tomko
Received on Thu Feb 12 1998 - 00:00:00 CST

Original text of this message

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