oracle 查询非自增长分区的最大分区

三次方

关注

阅读 54

2022-07-18

select a.table_owner, a.table_name, a.max_partition
from (select table_owner, table_name, max(partition_name) max_partition
from dba_tab_partitions
where table_owner not in ('SYS', 'SYSTEM')
and partition_name not in ('PMAXVAL', 'PMAX')
and table_name not in (select distinct table_name
from dba_tab_partitions
where interval = 'YES')
group by table_owner, table_name
order by 3) a

日积月累



精彩评论(0)

0 0 举报