-- 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;
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
tablespace ts_ziken_01 nologging
select count(*) from BILL_MONTHFEE_ZERO partition (p_200407);
insert into bill_monthfee_zero select * from bill_monthfee_zero partition (p_200407)
buffer=102400
tables=bill_monthfee:P_200401,
file=E:\exp_para\exp_dxsq_tables.dmp
log=E:\exp_para\exp_dxsq_tables.log
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17179887/viewspace-662455/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/17179887/viewspace-662455/