1.删除分区
alter table test_table drop partition(id='123',dt='2022-12-02');
2.写数据到分区表
insert into test_table partition(id='124',dt='2022-12-01')
(name,age,phone) values('小明',8,'13547472525');
定义说明
test_table :表名
id:第一个分区
dt: 第二个分区
本文提供了如何使用SQL语句进行分区表的操作实例,包括删除指定分区的数据及向分区表中插入新数据的方法。
alter table test_table drop partition(id='123',dt='2022-12-02');
insert into test_table partition(id='124',dt='2022-12-01')
(name,age,phone) values('小明',8,'13547472525');
定义说明
test_table :表名
id:第一个分区
dt: 第二个分区
3489
1万+

被折叠的 条评论
为什么被折叠?