This topic describes how to check a partition or subpartition and display whether the data or indexes are corrupted in the partition or subpartition.
Syntax
The ALTER TABLE ... CHECK PARTITION statement is used to check a partition or subpartition and display whether the data or indexes are corrupted in the partition or subpartition.
ALTER TABLE table_name
CHECK PARTITION {partition_names | ALL}partition_names is:{partition_name | subpartition_name}Parameters
| Parameter | Description |
| table_name | The name (optionally schema-qualified) of the partitioned table. |
| partition_name | The name of the partition. |
| subpartition_name | The name of the subpartition. |
Examples
Check the
q1_2021 partition and the p5 subpartition of the sales_range_list table:ALTER TABLE sales_range_list CHECK PARTITION q1_2021,q5;Check the
p5 subpartition of the sales_range_list table:ALTER TABLE sales_range_list CHECK PARTITION q5;