Oracle Database Table partitioning Range partitioning

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

This creates a table partitioned by ranges, in this example on order values.

CREATE TABLE orders (
    order_nr NUMBER(15),
    user_id VARCHAR2(2),
    order_value NUMBER(15),
    store_id NUMBER(5)
) 
PARTITION BY RANGE(order_value) (
    PARTITION p1 VALUES LESS THAN(10), 
    PARTITION p2 VALUES LESS THAN(40), 
    PARTITION p3 VALUES LESS THAN(100),
    PARTITION p4 VALUES LESS THAN(MAXVALUE)
); 


Got any Oracle Database Question?