set verify off
set echo off
set pagesize 200
set linesize 150
column type format a10 heading "Type"
column cons_name format a30 heading "Name"
column status heading "Status"
column last_change heading "Last Chg"
accept tableName prompt "Table: "
select decode(constraint_type,
'C', 'Check',
'O', 'R/O View',
'P', 'Primary',
'R', 'Foreign',
'U', 'Unique',
'V', 'Check view') type,
constraint_name cons_name,
status,
last_change
from dba_constraints
where table_name = upper('&tableName')
order by 1
/