-- =======================================================================
-- Exibe as restrições de integridade(constraints) de uma determinada tabela.
-- =======================================================================
set verify off
col OWNER for a8
select OWNER,
CONSTRAINT_NAME,
CONSTRAINT_TYPE,
TABLE_NAME,
SEARCH_CONDITION,
R_OWNER,
R_CONSTRAINT_NAME,
DELETE_RULE,
STATUS,
DEFERRABLE,
DEFERRED,
VALIDATED
from dba_constraints
where owner = upper('&1')
and table_name = upper('&2')
order by CONSTRAINT_TYPE
/
col COLUMN_NAME for a30
select OWNER, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, POSITION
from DBA_CONS_COLUMNS
where CONSTRAINT_NAME = '&3'
/
set verify on