--PARAMETROS
-- P1: OWNER
-- P2: CONTRAINT PRIMARY KEY

--COL LISTA1 FORMAT A120
COL LISTA1 FORMAT A300

select c.owner||'.'||c.table_name||' - '||c.constraint_name as lista1
from dba_constraints c where OWNER = upper('&1') and constraint_name = upper('&2')
union all
select lista1 from
(SELECT LPAD(' ',(LEVEL)*6)||c.owner||'.'||c.table_name||' - '||substr(c.status,1,1)||' - '||c.DELETE_RULE||' - '||c.constraint_name as lista1
FROM dba_constraints r, dba_constraints c
WHERE r.owner = c.r_owner
AND r.constraint_name = c.r_constraint_name
START WITH r.owner = upper('&1') AND r.constraint_name = upper('&2')
CONNECT BY NOCYCLE r.owner = PRIOR c.owner
AND r.table_name = PRIOR c.table_name
--ORDER BY c.owner,c.table_name,level
);
