2、 创建hash分区
语法如下:[图:hash_partitioning.gif]
语法看起来比range复杂,其实使用起来比range更简单,这里需要我们指定的有:
column: 分区依赖列(支持多个,中间以逗号分隔);
partition: 指定分区,有两种方式:
直接指定分区名,分区所在表空间等信息
只指定分区数量,和可供使用的表空间。
① 创建hash分区表
JSSWEB> create table t_partition_hash (id number,name varchar2(50))
2 partition by hash(id)(
3 partition t_hash_p1 tablespace tbspart01,
4 partition t_hash_p2 tablespace tbspart02,
5 partition t_hash_p3 tablespace tbspart03);
表已创建。
要实现同样效果,你还可以这样:
JSSWEB> create table t_partition_hash2 (id number,name varchar2(50))
2 partition by hash(id)
3 partitions 3 store in(tbspart01,tbs