Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Partitioning a large table by month
Hello, I'm using Oracle 9i and I need to partition a table by months,
here's the table creation code and the code that I've managed to
create so far but hasn't worked.
Any help would be very welcomed.
Thanks
CREATE TABLE serie_d(
nombre_var_clim_sd VARCHAR2(100), fecha_sd DATE, latitud_sd VARCHAR2(10), longitud_sd VARCHAR2(10), valor_sd NUMBER(5,2),
USING INDEX TABLESPACE tbs_s,
CONSTRAINT FK_SERIE_D_VC_NOMBREVC FOREIGN KEY (nombre_var_clim_sd)
REFERENCES variable_climatica,
CONSTRAINT DOM_SD_VALOR CHECK (valor_sd between -100 and 100)
)
PARTITION BY LIST (EXTRACT(MONTH FROM fecha_sd)) (
PARTITION month01 VALUES (01)
TABLESPACE tbs_l,
PARTITION month02 VALUES (02)
TABLESPACE tbs_l,
PARTITION month03 VALUES (03)
TABLESPACE tbs_l,
PARTITION month04 VALUES (04)
TABLESPACE tbs_l,
PARTITION month05 VALUES (05)
TABLESPACE tbs_l,
PARTITION month06 VALUES (06)
TABLESPACE tbs_l,
PARTITION month07 VALUES (07)
TABLESPACE tbs_l,
PARTITION month08 VALUES (08)
TABLESPACE tbs_l,
PARTITION month09 VALUES (09)
TABLESPACE tbs_l,
PARTITION month10 VALUES (10)
TABLESPACE tbs_l,
PARTITION month11 VALUES (11)
TABLESPACE tbs_l,
PARTITION month12 VALUES (12)
TABLESPACE tbs_l)
Received on Mon Nov 12 2007 - 00:08:14 CST
![]() |
![]() |