代码段:
按 id 段分区:
MySQL表分区_atwdy的博客-CSDN博客_mysql 表分区
drop table if exists `range_table`;
create table `range_table`(
`id` int,
`name` varchar(10)
)
partition by range(id)(
partition p1 values less than (10),
partition p2 values less than (20),
partition p3 values less than maxvalue
);
select * from range_table partition (p1);