Oracle 虚拟列 子分区 virtual column partition
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle 虚拟列 子分区 virtual column partition相关的知识,希望对你有一定的参考价值。
Oracle 11g 虚拟列子分区实验
以下两个create 语句均为创建成功;
需求描述:
项目要求对3个字段进行分区,如时间,小时,还有个区域ID,便联想到虚拟列。
drop table test_part purge; create table test_part (t_time date, hour number, city_id number, hour_city varchar2(108) GENERATED ALWAYS AS(to_char(hour)||‘|‘||to_char(city_id))) partition by range(t_time) subpartition byhash(hour_city) (partition part_201705 values less than(to_date(‘20170601‘, ‘yyyymmdd‘)) (subpartition subpart_201705_01, subpartition subpart_201705_02), partition part_201706 values less than (to_date(‘20170701‘, ‘yyyymmdd‘)) (subpartition subpart_201706_01, subpartition subpart_201706_02)) create table test_part (t_time date, hour number(2), city_id number, day_hour varchar2(50) GENERATED ALWAYS AS (to_char(t_time,‘yyyymmdd‘)||‘|‘||to_char(hour))) partition by range(day_hour) subpartition byhash(city_id) (partition part_201705 values less than(‘2017060100‘) (subpartition subpart_201705_01, subpartition subpart_201705_02), partition part_201706 values less than (‘2017070100‘) (subpartition subpart_201706_01, subpartition subpart_201706_02))
本文出自 “90SirDB” 博客,请务必保留此出处http://90sirdb.blog.51cto.com/8713279/1928778
以上是关于Oracle 虚拟列 子分区 virtual column partition的主要内容,如果未能解决你的问题,请参考以下文章
win7系统装了个virtual box,虚拟了一个redhat5,安装oracle 11g的时候,报INS-32021
Cadence Virtual.Component.CO-Design.v2.2-ISO 1CD(虚拟元件协同设计,VCC)