set verify off
define p_owner=upper('&1.')
define p_table=upper('&2.')
col table_name format a30
col column_name format a30
col segment_name format a30
with lobs3 as
(
SELECT
a.owner
,a.table_name
,a.column_name
,a.segment_name
,a.tablespace_name
,a.chunk
,a.logging
,a.in_row
,a.cache
,case when bitand(l.flags, 32)=0 then l.pctversion$ else null end pctversion
,case when bitand(l.flags, 32)=32 then l.retention else null end retention
FROM dba_objects o
join sys.lob$ l on (o.object_id = l.lobj#)
join dba_lobs a on ( a.owner= o.owner and a.segment_name = o.object_name )
WHERE owner = &p_owner.
)
SELECT
l.owner
,l.table_name
,l.column_name
,l.pctversion
,l.retention
,l.chunk
,l.in_row
,l.cache
,l.tablespace_name
,l.segment_name
FROM lobs3 l
WHERE l.table_name like &p_table.
/
undefine p_owner p_table 1 2
set verify on