oracle 查询指定约束的关联表

SELECT a.constraint_name,
  a.table_name,
  b.constraint_name
FROM user_constraints a,
  user_constraints b
WHERE a.constraint_type = 'R'
AND b.constraint_type   = 'P'
AND a.r_constraint_name = b.constraint_name
  and a.constraint_name LIKE '%约束名称%'
  ;

你可能感兴趣的:(oracle,约束,关联)