/*查看用户所有外键*/
select /*+ all_rows */ t.table_name,t.constraint_name, s.table_name ref_table,s.column_name ref_column from user_constraints u,
(select uc.table_name,uc.constraint_name ,uc.r_constraint_name from user_constraints uc where uc.constraint_type='R' ) t,
(select c.constraint_name,c.table_name,c.column_name from user_cons_columns c) s
where t.r_constraint_name=u.constraint_name
and u.constraint_name=s.constraint_name
order by t.table_name;