버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

코드 블럭
title원본 테이블 삭제
drop table TEST.DPTEST;

파티션 테이블 생성

코드 블럭
title파티션 테이블 생성
linenumberstrue
create table TEST.DPTEST
(
    BASE_DT     VARCHAR2(8) not null,
    TESTCOL1    VARCHAR2(20) not null,
    TESTCOL2    NUMBER not null,
    TESTCOL3    CHAR(20) not null,
    TESTCOL4    VARCHAR2(20),
    TESTCOL5    CHAR(20),
    TESTCOL6    NCHAR(20),
    TESTCOL7    VARCHAR2(20),
    TESTCOL8    VARCHAR2(20),
    TESTCOL9    VARCHAR2(20)
)
tablespace PT_TEST
nologging
partition by range (BASE_DT)
(
partition DPTEST_P201504 values less than ('20150501'),
partition DPTEST_P201505 values less than ('20150601'),
partition DPTEST_P201506 values less than ('20150701'),
partition DPTEST_P201507 values less than ('20150801'),
partition DPTEST_P201508 values less than ('20150901'),
partition DPTEST_P201509 values less than ('20151001'),
partition DPTEST_P201510 values less than ('20151101'),
partition DPTEST_P201511 values less than ('20151201'),
partition DPTEST_P201512 values less than ('20160101'),
partition DPTEST_P201601 values less than ('20160201'),
partition DPTEST_P201602 values less than ('20160301'),
partition DPTEST_P201603 values less than ('20160401'),
partition DPTEST_P201604 values less than ('20160501'),
partition DPTEST_P201605 values less than ('20160601'),
partition DPTEST_P201606 values less than ('20160701'),
partition DPTEST_P201607 values less than ('20160801'),
partition DPTEST_P201608 values less than ('20160901'),
partition DPTEST_P201609 values less than ('20161001'),
partition DPTEST_P201610 values less than ('20161101'),
partition DPTEST_P201611 values less than ('20161201'),
partition DPTEST_P201612 values less than ('20170101'),
partition DPTEST_P201701 values less than ('20170201'),
partition DPTEST_P201702 values less than ('20170301'),
partition DPTEST_P201703 values less than ('20170401'),
partition DPTEST_P201704 values less than ('20170501'),
partition DPTEST_P201705 values less than ('20170601'),
partition DPTEST_P201706 values less than ('20170701'),
partition DPTEST_P201707 values less than ('20170801'),
partition DPTEST_P201708 values less than ('20170901'),
partition DPTEST_P201709 values less than ('20171001'),
partition DPTEST_P201710 values less than ('20171101'),
partition DPTEST_P201711 values less than ('20171201'),
partition DPTEST_P201712 values less than ('20180101'),
partition DPTEST_P201801 values less than ('20180201'),
partition DPTEST_P201802 values less than ('20180301'),
partition DPTEST_P201803 values less than ('20180401'),
partition DPTEST_P201804 values less than ('20180501'),
partition DPTEST_P201805 values less than ('20180601'),
partition DPTEST_P201806 values less than ('20180701'),
partition DPTEST_P201807 values less than ('20180801'),
partition DPTEST_P201808 values less than ('20180901'),
partition DPTEST_P201809 values less than ('20181001'),
partition DPTEST_P201810 values less than ('20181101'),
partition DPTEST_P201811 values less than ('20181201'),
partition DPTEST_P201812 values less than ('20190101'),
partition DPTEST_P201901 values less than ('20190201'),
partition DPTEST_P201902 values less than ('20190301'),
partition DPTEST_P201903 values less than ('20190401'),
partition DPTEST_P201904 values less than ('20190501'),
partition DPTEST_P201905 values less than ('20190601'),
partition DPTEST_P201906 values less than ('20190701'),
partition DPTEST_P201907 values less than ('20190801'),
partition DPTEST_P201908 values less than ('20190901'),
partition DPTEST_P201909 values less than ('20191001'),
partition DPTEST_P201910 values less than ('20191101'),
partition DPTEST_P201911 values less than ('20191201'),
partition DPTEST_P201912 values less than ('20200101'),
partition DPTEST_P202001 values less than ('20200201'),
partition DPTEST_P202002 values less than ('20200301'),
partition DPTEST_P202003 values less than ('20200401'),
partition DPTEST_P202004 values less than ('20200501'),
partition DPTEST_P202005 values less than ('20200601'),
partition DPTEST_P202006 values less than ('20200701'),
partition DPTEST_P202007 values less than ('20200801'),
partition DPTEST_P202008 values less than ('20200901'),
partition DPTEST_P202009 values less than ('20201001'),
partition DPTEST_P202010 values less than ('20201101'),
partition DPTEST_P202011 values less than ('20201201'),
partition DPTEST_P202012 values less than ('20210101'),
partition DPTEST_P202101 values less than ('20210201'),
partition DPTEST_P202102 values less than ('20210301'),
partition DPTEST_P202103 values less than ('20210401'),
partition DPTEST_P202104 values less than ('20210501'),
partition DPTEST_P202105 values less than ('20210601'),
partition DPTEST_P202106 values less than ('20210701'),
partition DPTEST_P202107 values less than ('20210801'),
partition DPTEST_P202108 values less than ('20210901'),
partition DPTEST_P202109 values less than ('20211001'),
partition DPTEST_P202110 values less than ('20211101'),
partition DPTEST_P202111 values less than ('20211201'),
partition DPTEST_P202112 values less than ('20220101'),
partition DPTEST_P202201 values less than ('20220201'),
partition DPTEST_P202202 values less than ('20220301'),
partition DPTEST_P202203 values less than ('20220401'),
partition DPTEST_P202204 values less than ('20220501'),
partition DPTEST_P202205 values less than ('20220601'),
partition DPTEST_P202206 values less than ('20220701'),
partition DPTEST_P202207 values less than ('20220801'),
partition DPTEST_P202208 values less than ('20220901'),
partition DPTEST_P202209 values less than ('20221001'),
partition DPTEST_P202210 values less than ('20221101'),
partition DPTEST_P202211 values less than ('20221201'),
partition DPTEST_P202212 values less than ('20230101')
);

...

코드 블럭
titleLocal 파티션 인덱스를 사용하는 PK 추가
alter table TEST.DBTEST_PT add constraint PK_DPTEST_PT primary key (BASE_DT,TESTCOL1,TESTCOL2) using index;

테이블 인덱스 속성 원복

테이블 속성 원복

코드 블럭
title테이블 로깅 옵션 원복
alter table TEST.DPTEST logging;

...