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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to retrieve FOREIGN key information from an ORACLE database using Visual Basic (and preferably ADO/ADOX)

Re: How to retrieve FOREIGN key information from an ORACLE database using Visual Basic (and preferably ADO/ADOX)

From: DI Karl Heinz Hörmann <kh.hoermann_at_penta.at>
Date: Fri, 28 Jan 2000 00:51:48 +0100
Message-ID: <86qlcr$aom$1@newsmaster01.magnet.at>

Shared PC wrote in <948976460.19446.0.nnrp-03.c2de9529_at_news.demon.co.uk>...
>Can anyone please give me some guidance as to a way in which it is possible
>to read from an ORACLE database the foreign keys.

ALL_CONSTRAINTS gives you OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE ('R' means referential), TABLE_NAME (referencing table :: from), R_OWNER (of), R_CONSTRAINT_NAME (name of the unique constraint of the referenced table :: to), DELETE_RULE plus some other information about the constraint ...

ALL_CONS_COLUMNS contains OWNER, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, POSITION (of column in the constraint definition)

analogous you might use the DBA_.... / USER_.... structures -

refer to Chapter 2 - Static Data Dictionary Views of the Oracle Reference Manual for details

hth Received on Thu Jan 27 2000 - 17:51:48 CST

Original text of this message

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