- 查看分区
show create table ai_log.ai_transaction_log;
- 删除分区
alter table ai_log.ai_transaction_log drop PARTITION P_20220401;
- 新增分区
alter table ai_log.ai_transaction_log add PARTITION
(
PARTITION P_20220401 VALUES LESS THAN (to_days('20220402')),
PARTITION P_20220402 VALUES LESS THAN (to_days('20220403')),
PARTITION P_20220403 VALUES LESS THAN (to_days('20220404')),
PARTITION P_20220404 VALUES LESS THAN (to_days('20220405'))
);