You can't have NULL
in the partition key column of an interval partitioned table (as of 12.1):
Restrictions on Interval Partitioning
- You can specify only one partitioning key column, and it must be of NUMBER, DATE, FLOAT, or TIMESTAMP data type.
[...]
- You cannot specify NULL values for the partitioning key column.
You can't use expressions either for the partitioning key. However as suggested by @Shoelace you can use a virtual column (containing your expression) as a partition column:
SQL> CREATE TABLE a (b NUMBER, comput_b NUMBER AS (NVL(b, 0)))
2 PARTITION BY RANGE (comput_b) (
3 PARTITION p0 VALUES LESS THAN (0),
4 PARTITION p1 VALUES LESS THAN (50),
5 PARTITION p2 VALUES LESS THAN (MAXVALUE)
6 );
Table created
SQL> INSERT INTO a(b) VALUES (1);
1 row inserted
SQL> INSERT INTO a(b) VALUES (11);
1 row inserted
SQL> INSERT INTO a(b) VALUES (51);
1 row inserted
SQL> INSERT INTO a(b) VALUES (null);
1 row inserted
SQL> SELECT * FROM a;
B COMPUT_B
---------- ----------
1 1
11 11
0
51 51
In this particular case I think you would need a table rebuild.