Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Foreign keys data dictionary
Hello,
I couldn't reconstruct a foreign key information through the data dictionary. I can reconstruct a primary key information, but not foreign key.
I want to be able to do a select in the data dictionary that returns information equivalente to the foreign key creation sql:
ALTER TABLE SN_REL_CONTRATO_PRODUTO ADD (
CONSTRAINT FKSN_REL_CONTRATO_PRODUTO FOREIGN KEY (NUM_CONTRATO, CID_CONTRATO) REFERENCES SN_CONTRATO ( NUM_CONTRATO, CID_CONTRATO)
The information from the oracle data dictionary could be returned like this: FN_NAME TABLE_NAME COLUMN REFERENCED_TABLE_NAME REFERENCED_TABLE_COLUMN Thanks for any help:
Cesta
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Dec 14 1998 - 04:49:35 CST