ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle组合分区系列二(composite hash partition)

oracle组合分区系列二(composite hash partition)

原创 Linux操作系统 作者:wisdomone1 时间:2013-01-10 16:08:34 0 删除 编辑
在上文:http://space.itpub.net/9240380/viewspace-752465,测试了组合范围分区.
本文继续学习组合哈希分区的相关使用
---用子分区模板创建组合分区(模板:可理解为通用方法,一次创建多次使用)
---范围子分区
SQL> create table t_hash(a int,b int)
  2  partition by hash(a)
  3  subpartition by range(b)
  4  subpartition template(
  5                        subpartition sub1 values less than (5),
  6                        subpartition sub2 values less than (10)
  7                       )
  8  (
  9   partition px1,
 10   partition px2
 11  )
 12  /
 
Table created

---列表子分区
SQL> create table t_hash(a int,b int)
  2  partition by hash(a)
  3  subpartition by list(b)
  4  subpartition template(
  5                        subpartition sub1 values (1,2,3,4,5),
  6                        subpartition sub2 values (6,7,8,9,10)
  7                       )
  8  (
  9   partition px1,
 10   partition px2
 11  )
 12  /
 
Table created
 
---哈希子分区
SQL> create table t_hash(a int,b int)
  2  partition by hash(a)
  3  subpartition by hash(b)
  4  subpartition template(
  5                        subpartition sub1,
  6                        subpartition sub2
  7                       )
  8  (
  9   partition px1,
 10   partition px2
 11  )
 12  /
 
Table created

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-752471/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12689917