SELECT PK.OWNER , PK.TABLE_NAME , FK.OWNER , CO.COLUMN_NAME , FK.CONSTRAINT_NAME , FK.TABLE_NAME FROM ALL_CONSTRAINTS FK , ALL_CONSTRAINTS PK , ALL_CONS_COLUMNS CO WHERE FK.CONSTRAINT_TYPE = 'R' AND FK.R_CONSTRAINT_NAME = PK.CONSTRAINT_NAME AND FK.R_OWNER = PK.OWNER --AND PK.OWNER = '계정명' --AND PK.TABLE_NAME = '테이블명' AND CO.OWNER = FK.OWNER AND CO.CONSTRAINT_NAME = FK.CONSTRAINT_NAME ORDER BY PK.OWNER , PK.TABLE_NAME
;
https://jhnyang.tistory.com/350 참고했습니다...
SELECT a.r_owner , a.r_constraint_name , b.table_name r_table_name , b.column_name r_column_name , b.position r_position , a.owner , a.constraint_name , a.table_name FROM user_constraints a , user_cons_columns b WHERE a.constraint_type = 'R' AND a.r_owner = b.owner AND a.r_constraint_name = b.constraint_name ;