久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

oracle分區(qū)表學習及應用

瀏覽:44日期:2023-11-17 11:30:58
-- Create table(創(chuàng)建分區(qū)表)create table BILL_MONTHFEE_ZERO( SERV_ID;;NUMBER(20) not null, BILLING_CYCLE_MONTH NUMBER(6) not null, ; DATE_TYPENUMBER(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_idxstorage(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_200409values 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_200409tablespace;ts_ziken_01 nologging;--查詢特定分區(qū)select count(*) from BILL_MONTHFEE_ZERO partition (p_200407);;--添加數據insert into bill_monthfee_zero select * from bill_monthfee_zero partition (p_200407);--分區(qū)表的導出userid=dxsq/teledoone@jndxsq154buffer=102400tables=bill_monthfee:P_200401,file=E:eXP_paraexp_dxsq_tables.dmplog=E:exp_paraexp_dxsq_tables.log;;技巧:刪除表中一個字段:alter table bill_monthfee_zero set unused column date_type;添加一個字段:alter table bill_monthfee_zero add date_type number(1);
標簽: Oracle 數據庫
主站蜘蛛池模板: 抚宁县| 治多县| 象州县| 兴义市| 长治市| 克山县| 绥棱县| 台东市| 易门县| 洪湖市| 阳江市| 新建县| 塘沽区| 泌阳县| 定兴县| 岳池县| 北川| 诏安县| 平果县| 阿拉善盟| 会东县| 阿拉尔市| 余干县| 龙陵县| 綦江县| 城固县| 松江区| 长泰县| 临泉县| 广东省| 汶上县| 龙门县| 安吉县| 突泉县| 万全县| 乡城县| 张家界市| 左贡县| 沾化县| 辽中县| 玉溪市|