Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Primary Key definition from data dictionary
How can i get the definition of a foreign key from the ALL_CONSTRAINTS,
ALL_CONS_COLUMNS?.
The View ALL_CONS_COLUMNS Shows me only the columns of the foreign key
table and not the
references column. Who can help?
/
DROP TABLE KOPF;
DROP TABLE ZEILE;
/
CREATE TABLE KOPF(
K_NR NUMBER( 10, 0 ), K_KUNDE NUMBER( 10, 0 ), CONSTRAINT KOPF_PK PRIMARY KEY ( K_NR ) )
Z_NR NUMBER( 10, 0 ), Z_POS NUMBER( 10, 0 ), Z_ARTIKEL NUMBER( 10, 0 ),
KOPF_PK P KOPF ZEILE_FK R ZEILE BOKU KOPF_PK NO ACTION ZEILE_PK P ZEILE
CONSTRAINT_NAME TABLE_NAME COLUMN_NAME POSITION KOPF_PK KOPF K_NR 1 ZEILE_FK ZEILE Z_NR 1 ZEILE_PK ZEILE Z_NR 1 ZEILE_PK ZEILE Z_POS 2