--list分区
drop table if exists stu_msg2;
create table stu_msg2
(
id integer not null ,
name varchar(30) not null
)
fragment BY list (id)
partition PART_D01 values (1,3,5,7) in datadbs1,
partition PART_D02 values (2,4,6,8) in datadbs2,
partition PART_D03 remainder in datadbs1;
--也可以:
CREATE TABLE test_list (col1 int) fragment BY list(col1)
partition p1 values (1)in datadbs1,
partition p2 values (2)in datadbs1,
partition p3 values (3)in datadbs1,
partition p4 values (4)in datadbs1
--间隔分区
drop table if exists jg;
CREATE TABLE jg (id_ddd INTEGER, name_zzz CHAR(32))
FRAGMENT BY RANGE (id_ddd)
INTERVAL (100) STORE IN (datadbs1, datadbs2, datadbs3)
PARTITION p0 VALUES < 100 IN datadbs1,
PARTITION p1 VALUES < 200 IN datadbs2;
insert into jg values (1,'aa');
insert into jg values (101,'bb');
insert into jg values (201,'cc');




