DBA_PART_KEY_COLUMNS

2026-04-02 06:23:58  Updated

Note

This view is available starting with V2.2.77.

Purpose

This view displays the columns of the primary partitioning key in all partitioned objects of the current tenant.

Columns

Column Type Nullable Description
OWNER VARCHAR2(128) NO The owner of the partitioned table or partitioned index.
NAME VARCHAR2(128) NO The name of the partitioned table or partitioned index.
OBJECT_TYPE CHAR(5) NO The type of the partitioned object. Valid values:
  • TABLE
  • INDEX
COLUMN_NAME VARCHAR2(4000) NO The name of the column.
COLUMN_POSITION NUMBER NO The position of the column in the primary partitioning key.
COLLATED_COLUMN_ID NUMBER NO This column is not supported. The value of this column is NULL by default.

Sample query

Query the columns of the primary partitioning key in the partitioned table TBL1_H of the current user tenant.

obclient [SYS]> SELECT * FROM SYS.DBA_PART_KEY_COLUMNS WHERE NAME='TBL1_H';

The query result is as follows:

+-------+--------+-------------+-------------+-----------------+--------------------+
| OWNER | NAME   | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+-------+--------+-------------+-------------+-----------------+--------------------+
| SYS   | TBL1_H | TABLE       | COL1        |               1 |               NULL |
+-------+--------+-------------+-------------+-----------------+--------------------+
1 row in set

References

  • Query the columns of the primary partitioning key in all partitioned objects of all tenants: CDB_PART_KEY_COLUMNS

  • Query the columns of the primary partitioning key in partitioned objects accessible to the current user: ALL_PART_KEY_COLUMNS

  • Query the columns of the primary partitioning key in partitioned objects owned by the current user: USER_PART_KEY_COLUMNS

Contact Us