Wednesday, May 5, 2021

t_spec

col OWNER for a15
col TABLE_NAME for a30
col PARTITIONED for a15
col TBS for a30
set lin 450

select
owner, table_name, decode(partitioned,'YES', 'YES - ' || (
select count(*)
from dba_tab_partitions
where lower(table_name) =lower('&&TABLE_NAME') ) ,partitioned ) Partitioned , (
select count(*)
from dba_indexes b
where lower(table_name) =lower('&&TABLE_NAME') and b.owner =a.owner ) indx_cnt , decode(iot_type,null,'NO','YES') IOT , last_analyzed , (
select created
from dba_objects b
where b.owner=a.owner and lower(b.object_name) =lower('&&TABLE_NAME') and object_type='TABLE') Created, num_rows, tablespace_name TBS
from dba_tables a
where lower(table_name) =lower('&&TABLE_NAME')

 

 

 

 

 

No comments:

Post a Comment