Show!
Pensando ainda nessa linha de TABLE x CONSTRAINTS, tem esse aqui tb:
-- Constraints of a distinct table
set lines 120
set pages 2000
set trimout on
set feed on
col INDEX_NAME for a30
col INDEX_TYPE for a15
col bytes for 999,999,999,999
col TABLE_OWNER for a10
col owner for a10
col status for a10
col constraint_name for a20
col r_constraint_name for a20
break on report on tablespace_name skip 1
comp sum of bytes on report
undef table_name
prompt
accept table_name prompt 'Deseja verificar as constraints de qual tabela ? '
accept owner prompt 'Qual o OWNER ? '
prompt
cl screen
ttitle center 'CONSTRAINTS DA TABELA: ' &table_name skip 2
prompt
prompt
select cons.OWNER, cons.TABLE_NAME, cons.CONSTRAINT_NAME, cons.CONSTRAINT_TYPE, cons.STATUS, cons.R_CONSTRAINT_NAME, (select TABLE_NAME from dba_constraints
where CONSTRAINT_NAME=cons.R_CONSTRAINT_NAME) as R_TABLE
from dba_constraints cons
where owner=upper('&owner')
and table_name=upper('&table_name')
order by constraint_name
/
Posta ai depois se era isso que precisava..
abs