table_partitions.sql

来自「oracle dba 常用的管理脚本, 覆盖日常的系统管理.」· SQL 代码 · 共 29 行

SQL
29
字号
--* File Name    : Table_Partitions.sql
--* Author       : DR Timothy S Hall
--* Description  : Displays partition information for the specified table, or all tables.
--* Requirements : Access to the DBA views.
--* Call Syntax  : @Table_Partitions (table-name or all) (schema-name)
--* Last Modified: 15/07/2000
SET LINESIZE 500
SET PAGESIZE 1000
SET FEEDBACK OFF
SET VERIFY OFF

SELECT a.table_name,
       a.partition_name,
       a.tablespace_name,
       a.initial_extent,
       a.next_extent,
       a.pct_increase,
       a.num_rows,
       a.avg_row_len
FROM   dba_tab_partitions a
WHERE  a.table_name  = Decode(Upper('&&1'),'ALL',a.table_name,Upper('&&1'))
AND    a.table_owner = Upper('&&2')
ORDER BY a.table_name, a.partition_name
/


SET PAGESIZE 14
SET FEEDBACK ON

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?