drop table measurement;
CREATE TABLE measurement (
city_id int not null,
logdate timestamp not null default now(),
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2022-12-01') TO ('2023-01-01');
CREATE TABLE measurement_y2006m03 PARTITION OF measurement FOR VALUES FROM ('2023-01-01') TO ('2023-02-01');
insert into measurement values (1,now(),1,1);
执行insert into measurement values (1,now(),1,1);