/* Show all foreign key references (table relationships) */ 

SELECT ucc1.table_name, ucc1.column_name, uc.constraint_name as REF_NAME, 
       ucc2.table_name as ref_table_name, ucc2.column_name as ref_column_name
 FROM  user_constraints uc 
  JOIN user_cons_columns ucc1 ON uc.constraint_name   = ucc1.constraint_name
  JOIN user_cons_columns ucc2 ON uc.r_constraint_name = ucc2.constraint_name 
WHERE uc.constraint_type = 'R'
ORDER BY 1,2