DROP PARTITION
You can run this command to remove unnecessary partitions. You can delete a partition by specifying the partition name or partition value.
- This command cannot be applied to hash partitions.
- Running this command will invalidate the global index. You can use the UPDATE GLOBAL INDEX clause to update the global index synchronously or rebuild the global index.
You can run ALTER TABLE DROP PARTITION to delete any partition from a range partitioned table or list partitioned table.
ALTER TABLE range_sales DROP PARTITION date_202005 UPDATE GLOBAL INDEX;
ALTER TABLE range_sales DROP PARTITION FOR ('2020-05-08');
- If a partitioned table has only one partition, the partition cannot be deleted by using the ALTER TABLE DROP PARTITION statement.
- If the partitioned table is a hash partitioned table, partitions in the table cannot be deleted by using the ALTER TABLE DROP PARTITION statement.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot