Message-Id: <10576.113458@fatcity.com> From: Dries Verachtert Date: Tue, 1 Aug 2000 11:34:14 +0200 (CEST) Subject: How to check if a column is a foreign key? If yes, to which column 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