/*
 * Title  : sho_tab_com.sql
 * Author : EXADIME LLC
 * Created: 29-Jul-2017
 * Updated: 29-Jul-2017
 * Release: 1.0.0
 * Purpose: This script shows table comments.
 * History: N/A
 */

start oracle.ini

set echo off
set feedback off
set serverout on
set termout on

set linesize 100
set pagesize 0
set pause off

set heading on
set headsep on
set underline on
set colsep " "

set define on
set verify off
set escape off
set embedded on

col table_name	heading	"Table Name"		format a30
col comments	heading "Table Comments"	format a60

accept p_owner	prompt 'Enter Owner: '

spool &&rpt_dir/sho_tab_com.rpt

select
	table_name,
	comments
from
	dba_tab_comments
where
	owner=upper('&&p_owner');

spool off

set embedded off
set escape off
set verify on
set define on

set colsep " "
set underline on
set headsep on
set heading on

set pause off
set pagesize 24
set linesize 80

set termout on
set serverout off
set feedback on
set echo off
