ITPub博客

首页 > 数据库 > Oracle > oracle分区表学习及应用

oracle分区表学习及应用

原创 Oracle 作者:3492zhang 时间:2006-07-19 14:56:32 0 删除 编辑

本文简介:选择自 zikenguo 的 blog

[@more@]
-- create table(创建分区表)
create table bill_monthfee_zero
(
serv_id number(20) not null,
billing_cycle_month number(6) not null,
date_type number(1),
acc_nbr varchar2(80)
)
partition by range (billing_cycle_month)
(partition p_200407 values less than (200407)
tablespace ts_ziken
storage(initial 100k next 100k minextents 1 maxextents unlimited pctincrease 0),
partition p_200408 values less than (200408)
tablespace ts_ziken
storage(initial 100k next 100k minextents 1 maxextents unlimited pctincrease 0))
;
create index idx_bill_monthfee_zero_idx01 on bill_monthfee_zero(billing_cycle_month)
tablespace ts_ziken_idx
storage(initial 100k next 100k minextents 1 maxextents unlimited pctincrease 0) nologging;
grant all on bill_monthfee_zero to dxsq_dev;


--增加分区表


alter table bill_monthfee_zero add partition p_200409
values less than (200409) tablespace ts_ziken;


--删除一分区
alter table part_tbl drop partition part_tbl_08;

--将一个分区分为两个分区
alter table bill_monthfee_zero split partition p_200409 at (200409)
into (partition p_200409_1 tablespace ts_ziken,
partition p_200409_2 tablespace ts_ziken_idx);

--合并分区alter table bill_monthfee_zero
merge partitions p_200408, p_200409 into partition p_all

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

请登录后发表评论 登录
全部评论
  • 博文量
    26
  • 访问量
    493836