Skip to Main Content

Oracle Database Discussions

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!

Table partition column with null value

Mike301Jul 1 2015 — edited Jul 5 2015

Friends,

DB: 11gR2

OS: Linux

I'm converting table into partition table and trying to figure out to do it.

Table has got a date column which can have null values and I'm partitioning table on date.

I'm creating interval partitioning and also want to use MAXVALUE so that all null dates will go there.

Somehow below syntax is not working, tried reading manual but not able to fix below;

CREATE TABLE EMP

   ( DATE_ENTERED   DATE                 default sysdate,

     ID                         NUMBER(10)      NOT NULL ENABLE,

     FIRST_NAME        VARCHAR2(200) NOT NULL ENABLE,

     LAS_NAME           VARHCAR2(200) NOT NULL ENABLE

    CONSTRAINT PK_ID PRIMARY KEY (ID)

  )

PARTITION BY RANGE (DATE_ENTERED)

INTERVAL (NUMTODSINTERVAL(1,'day'))

(

   partition P_NOT_USE values less than (to_date('2015-01-01', 'yyyy-mm-dd')),

   partition p_max_value values less than (MAXVALUE)

);

Receiving error:

ora-14761 maxvalue partition cannot be specified for interval partitioned objects.

Any tips to fix this?

I think using interval function is the problem but then how can we partition by day?

Also is there anyway/script available to find all permission/privileges of table before dropping it?

Manual: Maintaining Partitions

This post has been answered by John Stegeman on Jul 1 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2015
Added on Jul 1 2015
26 comments
18,261 views