国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

oracle分區(qū)表學(xué)習(xí)及應(yīng)用

2024-08-29 13:30:29
字體:
供稿:網(wǎng)友
,歡迎訪問網(wǎng)頁設(shè)計愛好者web開發(fā)。-- create table(創(chuàng)建分區(qū)表)
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; --增加分區(qū)表 alter table bill_monthfee_zero add partition p_200409
values less than (200409) tablespace ts_ziken;
--刪除一分區(qū)
alter table part_tbl drop partition part_tbl_08; --將一個分區(qū)分為兩個分區(qū)
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);  --合并分區(qū)
alter table bill_monthfee_zero
   merge partitions p_200408, p_200409 into partition p_all --將分區(qū)改名alter table bill_monthfee_zero rename partition p_200408 to p_fee_200408 --將分區(qū)改表空間alter table bill_monthfee_zero move partition p_200409
tablespace ts_ziken_01 nologging --查詢特定分區(qū)
select count(*) from bill_monthfee_zero partition (p_200407); --添加數(shù)據(jù)
insert into bill_monthfee_zero select * from bill_monthfee_zero partition (p_200407) --分區(qū)表的導(dǎo)出userid=dxsq/[email protected]
buffer=102400
tables=bill_monthfee:p_200401,
file=e:/exp_para/exp_dxsq_tables.dmp
log=e:/exp_para/exp_dxsq_tables.log  技巧:刪除表中一個字段:alter table bill_monthfee_zero set unused column date_type;添加一個字段:alter table bill_monthfee_zero add date_type number(1);
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 上思县| 尖扎县| 奎屯市| 汕尾市| 舞钢市| 织金县| 婺源县| 拉孜县| 寿阳县| 海盐县| 卫辉市| 康保县| 峨边| 东兴市| 双柏县| 社旗县| 绥宁县| 安化县| 县级市| 万全县| 大足县| 米泉市| 镇沅| 绥阳县| 青冈县| 海南省| 葵青区| 民县| 兴业县| 阿坝县| 平顺县| 和林格尔县| 安顺市| 阳江市| 婺源县| 兰州市| 上蔡县| 韶山市| 汨罗市| 丰都县| 汶川县|