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

Home -> Community -> Mailing Lists -> Oracle-L -> How to check if a column is a foreign key? If yes, to which column

How to check if a column is a foreign key? If yes, to which column

From: Dries Verachtert <dries_at_ulyssis.org>
Date: Tue, 1 Aug 2000 11:34:14 +0200 (CEST)
Message-Id: <10576.113458@fatcity.com>


Hello,

I'm trying to make a servlet which produces a nice form to fill in a new row of a table when you give it the name of the table as parameter. Finding the names of all the columns in the table and their types seems easy, but i can't find how to check if a column is a foreign key and to which column in another table it points.

Can someone give me some hints on which tables i need to use or if you got lotsa time, a nice query wich gives me the columnname, the columnname in the referenced table and the name of the referenced table of each foreignkey in a table? :-)
I'm trying to do this form java with jdbc to a oracle 8i 8.1.6.0 database. Jdbc has functions like getCrossReferences, getImportedKeys and getExportedKeys but that doesn't seem to give the correct output. Any idea if these functions also should give the output i need?

I've learned already a lot from this mailinglist. Is there somewhere a faq of the most asked questions on this list?

Thanx in advance,
Dries Verachtert Received on Tue Aug 01 2000 - 04:34:14 CDT

Original text of this message

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