Partition by Range(c1,c2) and have c1 to be MAXVALUE for a specific c2

I have a table where two of the columns are used for PARTITION BY RANGE(C1,C2). Is it possible to have a partition scheme where for a specific c2, c1 can be MAXVALUE? The number of records of for a specific C2 are very few and I would like to have just one partition for all C1 values.

>
I have a table where two of the columns are used for PARTITION BY RANGE(C1,C2). Is it possible to have a partition scheme where for a specific c2, c1 can be MAXVALUE? The number of records of for a specific C2 are very few and I would like to have just one partition for all C1 values.
>
If you want one partition for all C1 values for a particular C2 then you need to reverse the order of the partition keys and use PARTITION BY RANGE(C2, C1).
drop table myTable cascade constraints;
CREATE TABLE myTable (c1 number, c2 number, description varchar2(30))
PARTITION BY RANGE (C2, C1)
  (PARTITION p_before3_5 VALUES LESS THAN (3, 5),
   PARTITION p3_5_to_4_5  VALUES LESS THAN (4,5),
   PARTITION p4_5_to_5  VALUES LESS THAN (5,maxvalue),
   PARTITION p_special_6  VALUES LESS THAN (7,0),
   PARTITION future     VALUES LESS THAN (MAXVALUE,0));
insert into myTable (c2, c1) values (5, 3);
insert into myTable (c2, c1) values (6, 3);
insert into myTable (c2, c1) values (6, 8);
insert into myTable (c2, c1) values (7, 3);
select * from mytable partition (p_special_6);
C1,C2,DESCRIPTION
3,6,
8,6,The 'p_special_6' partition captures everything for C2 = 6 assuming that the min value of c1 is 0. Note that the previous partition has to be defined as '(5, maxvalue)' to capture everything less than C2 = 6.
See Example 4-21 Creating a multicolumn range-partitioned table in the doc link already provided for other examples.

Similar Messages

Maybe you are looking for

  • Partitioning Mac for Bootcamp Without Reformatting HDD

    Hello, I hope this is the correct area to start this discussion. I'm trying to figure out how I can install windows via boot camp, without reformatting my HDD (or use of installation CD). I'm currently on tour around the U.S., and my installation dis

  • Why Mail displays the name and address instead of address book name?

    File under the category of unanswered miscellaneous quirks by a new Mail user (the old posts were archived/locked).... I have found that by eliminating any spaces in FIRST name field, the Address Book name appears w/ blue losenge (w/o the e-mail addr

  • Why, when I try to do a search, does the system change the wording to another subject

    I ask for information on High voltage feed back from my KDL -46XBR9 TV into my cable box, causing damage to the cable box. I still need an answer on that problem, but the Sony search engine changes the wording to programing, widgets and other garbage

  • Production lead time report

    Hi, Given below mateiral with their lead time activity Material A- Finish (in house prodn) 100 qty = 10 days Low level in BOM X- Halb (2 days) Y-Roh (10 days) Z-Traded goods (2 days) Is there any report available which provide the information, if i w

  • Suddenly can't publish to Business Catalyst

    I'm suddenly unable to upload my site to Business Catalyst. When I try to do so, I get a dialog box named Publish, that says "Signing into Business Catalyst," with a spinning ball. Intermittently, I also get an error dialog box labeled "Adobe Busines