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!

SUBPARTITION BY HASH

sql_devOct 12 2015 — edited Oct 13 2015

Hi,

I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.

Can anyone guide me how to create a subpartition (HASH) on an existing RANGE partitioned table or some examples?

I understand in Oracle 11G, we can do a Composite Range-Hash Partitioning.

I have shared below for only one partition, but the table has more partitions. Should I modify all the partitions in the table for adding the subpartition based on TRANS_ID column?

CREATE TABLE MASTER_VALUE

(

  VALUE_DATE          DATE                      NOT NULL,

  TRANS_ID            NUMBER                    NOT NULL,

  TRANSFER_AMT        NUMBER,

  RECEIEVED_AMT       NUMBER                    DEFAULT -1,

  BOOK_ID             NUMBER                    DEFAULT -1,

)

PARTITION BY RANGE (VALUE_DATE)

(

  PARTITION RV_R_20141230 VALUES LESS THAN (TO_DATE(' 2014-12-31 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))

)

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2015
Added on Oct 12 2015
4 comments
1,380 views