SHOW PARTITION
Descriptionβ
SHOW PARTITION is used to display detailed information about a specified partition. This includes the name and ID of the associated database, the name and ID of the associated table, and the partition name.
Syntaxβ
SHOW PARTITION <partition_id>
Required Parametersβ
<partition_id>
The ID of the partition. The partition ID can be obtained through methods such as SHOW PARTITIONS. For more information, please refer to the "SHOW PARTITIONS" section.
Access Control Requirementsβ
The user executing this SQL command must have at least ADMIN_PRIV
permissions.
Examplesβ
Query partition information for partition ID 13004:
SHOW PARTITION 13004;
Results:
+--------+-----------+---------------+-------+---------+
| DbName | TableName | PartitionName | DbId | TableId |
+--------+-----------+---------------+-------+---------+
| ods | sales | sales | 13003 | 13005 |
+--------+-----------+---------------+-------+---------+