Example:
SELECT *
FROM detail partition (RECORDS_2010)
Create partition:
CREATE TABLE TEST_USER.DETAIL
(
ID NUMBER,
MASTER_ID NUMBER,
TRANS_ID NUMBER,
SERVICE VARCHAR2(100 BYTE),
C_CLASS VARCHAR2(100 BYTE),
C_CONDITION VARCHAR2(100 BYTE),
UPLINK_DATA VARCHAR2(100 BYTE),
DOWNLINK_DATA VARCHAR2(100 BYTE),
NO_OCS VARCHAR2(100 BYTE),
URL VARCHAR2(100 BYTE),
UPLINK NUMBER,
DOWNLINK NUMBER,
DATUM DATE,
DATUMSTR VARCHAR2(14 BYTE)
)
TABLESPACE TEST_USER
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
PARTITION BY RANGE (DATUM)
(
PARTITION RECORDS_2010 VALUES LESS THAN (TO_DATE(' 2011-01-01
00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
LOGGING
COMPRESS
TABLESPACE TEST_USER
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
),
PARTITION RECORDS_2011Q1 VALUES LESS THAN (TO_DATE(' 2011-04-01
00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
LOGGING
COMPRESS
TABLESPACE TEST_USER
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
)
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;