Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interval Partitioning table by Year

bobmaganMar 28 2013 — edited Mar 28 2013
I'm on 11.2 DB and want to start using some table partitioning on a new history table I am creating. I have a 'YEARID' number column that I want to use for the partition by and use the interval option so it automatically creates a new partition when a new 'YEARID' value is entered. I looked at some of the examples, but they all seem to call out the partitions like:

INTERVAL (NUMTOYMINTERVAL(1,'YEAR'))
STORE IN (tbs1,tbs2)
(partition p_2009 values less than (to_date('01-JAN-2010','DD-MON-YYYY'))

Can someone give me a quick example on how to create the interval partition (on a new table), using the 'YEARID' column (see table desc below)
Thanks!

ATTENDANCE:
YEARID NUMBER(10),
DCID NUMBER(10),
TRANS_DATE DATE,
CHANGE_DATE VARCHAR2(100)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2013
Added on Mar 28 2013
4 comments
1,227 views