Oracle 视图 USER_TAB_PARTITIONS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle 视图: USER_TAB_PARTITIONS
用途:它提供了当前用户下所有表的分区信息,包括表分区的名称、表名以及其子分区的类型、列名和列的值等。
使用方法:
1、查询某张表的分区情况:
SELECT TABLE_NAME, PARTITION_NAME, HIGH_VALUE
FROM USER_TAB_PARTITIONS
WHERE TABLE_NAME = ‘表名’;
2、查询某张表的子分区情况:
SELECT PARTITION_NAME, SUBPARTITION_NAME, HIGH_VALUE
FROM USER_TAB_PARTITIONS
WHERE TABLE_NAME = ‘表名’;
3、查询某张表中某个分区的内容:
SELECT *
FROM USER_TAB_PARTITIONS
WHERE TABLE_NAME =’表名’
AND PARTITION_NAME=’分区名’;
官方英文解释
USER_TAB_PARTITIONS
describes partition-level partitioning information, partition storage parameters, and partition statistics generated by the DBMS_STATS
package for all partitions owned by the current user.
Its columns are the same as those in ALL_TAB_PARTITIONS
.
See Also:
“ALL_TAB_PARTITIONS”