Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim
Older releases say inserted partition key does not map to any partition. Oracle 23ai/26ai prints the table and the value too: no partition found in table LAB_A.SALES for inserted partition key "2027-01-05T00:00:00", so you can see immediately which value is outside the partitions.
Compare that value with HIGH_VALUE in USER_TAB_PARTITIONS.
01A date beyond the last RANGE partition (new year arrived)
SALES has partitions up to LESS THAN 2027-01-01. The first sale of 2027 has no partition. This is the classic "it broke on January 1st" case.
Setup
CREATE TABLE sales (sale_id NUMBER, sale_date DATE, amount NUMBER)
PARTITION BY RANGE (sale_date) (
PARTITION p2025 VALUES LESS THAN (DATE '2026-01-01'),
PARTITION p2026 VALUES LESS THAN (DATE '2027-01-01')
);Table created.INSERT INTO sales VALUES (1, DATE '2027-01-05', 100);INSERT INTO sales VALUES (1, DATE '2027-01-05', 100)
*
ERROR at line 1:
ORA-14400: no partition found in table LAB_A.SALES for inserted partition key "2027-01-05T00:00:00"
Help: https://docs.oracle.com/error-help/db/ora-14400/SELECT partition_name, high_value FROM user_tab_partitions WHERE table_name = 'SALES' ORDER BY partition_position;PARTITION_NAME
--------------------------------------------------------------------------------------------------------------------------------
HIGH_VALUE
--------------------------------------------------------------------------------
P2025
TO_DATE(' 2026-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
P2026
TO_DATE(' 2027-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA
2 rows selected.ALTER TABLE sales ADD PARTITION p2027 VALUES LESS THAN (DATE '2028-01-01');Table altered.Check HIGH_VALUE in USER_TAB_PARTITIONS, then ALTER TABLE … ADD PARTITION p2027 VALUES LESS THAN (DATE '2028-01-01'). The row goes into P2027.
INSERT INTO sales VALUES (1, DATE '2027-01-05', 100);
SELECT sale_id, sale_date FROM sales PARTITION (p2027);1 row created.
SALE_ID SALE_DATE
---------- ------------------
1 05-JAN-27
1 row selected.02A monthly partitioned table where nobody added next month's partition
GL_JOURNAL only has the November 2026 partition, so the December 1 entry fails. Adding partitions by hand every month is easy to forget.
Setup
CREATE TABLE gl_journal (je_id NUMBER, je_date DATE, amount NUMBER)
PARTITION BY RANGE (je_date) (
PARTITION p202611 VALUES LESS THAN (DATE '2026-12-01')
);Table created.INSERT INTO gl_journal VALUES (1, DATE '2026-12-01', 500);INSERT INTO gl_journal VALUES (1, DATE '2026-12-01', 500)
*
ERROR at line 1:
ORA-14400: no partition found in table LAB_A.GL_JOURNAL for inserted partition key "2026-12-01T00:00:00"
Help: https://docs.oracle.com/error-help/db/ora-14400/ALTER TABLE gl_journal SET INTERVAL (NUMTOYMINTERVAL(1, 'MONTH'));Table altered.Turn the table into an interval partitioned table: ALTER TABLE gl_journal SET INTERVAL (NUMTOYMINTERVAL(1, 'MONTH')). Oracle then creates a partition automatically for each new month. After inserting December and January rows, the table has 3 partitions.
INSERT INTO gl_journal VALUES (1, DATE '2026-12-01', 500);
INSERT INTO gl_journal VALUES (2, DATE '2027-01-15', 700);
SELECT COUNT(*) AS partitions FROM user_tab_partitions WHERE table_name = 'GL_JOURNAL';1 row created.
1 row created.
PARTITIONS
----------
3
1 row selected.03A LIST partition value that is not listed
Only SEOUL and BUSAN have partitions, so a customer in DAEGU fails.
Setup
CREATE TABLE customers (cust_id NUMBER, region VARCHAR2(10))
PARTITION BY LIST (region) (
PARTITION p_seoul VALUES ('SEOUL'),
PARTITION p_busan VALUES ('BUSAN')
);Table created.INSERT INTO customers VALUES (1, 'DAEGU');INSERT INTO customers VALUES (1, 'DAEGU')
*
ERROR at line 1:
ORA-14400: no partition found in table LAB_A.CUSTOMERS for inserted partition key "DAEGU"
Help: https://docs.oracle.com/error-help/db/ora-14400/ALTER TABLE customers ADD PARTITION p_others VALUES (DEFAULT);Table altered.Add a catch-all partition: ADD PARTITION p_others VALUES (DEFAULT). DAEGU goes into P_OTHERS. If the value deserves its own partition, add a partition with that value instead.
INSERT INTO customers VALUES (1, 'DAEGU');
SELECT cust_id, region FROM customers PARTITION (p_others);1 row created.
CUST_ID REGION
---------- ----------
1 DAEGU
1 row selected.04NULL in the partition key column
For RANGE partitioning NULL sorts above every value, so it only fits a MAXVALUE partition. The message shows inserted partition key null.
Setup
CREATE TABLE shipments (ship_id NUMBER, ship_date DATE)
PARTITION BY RANGE (ship_date) (
PARTITION p2026 VALUES LESS THAN (DATE '2027-01-01')
);Table created.INSERT INTO shipments VALUES (1, NULL);INSERT INTO shipments VALUES (1, NULL)
*
ERROR at line 1:
ORA-14400: no partition found in table LAB_A.SHIPMENTS for inserted partition key null
Help: https://docs.oracle.com/error-help/db/ora-14400/ALTER TABLE shipments ADD PARTITION p_max VALUES LESS THAN (MAXVALUE);Table altered.Add PARTITION p_max VALUES LESS THAN (MAXVALUE) and the NULL row goes there. If the key must never be NULL, add a NOT NULL constraint instead and fix the data.
INSERT INTO shipments VALUES (1, NULL);
SELECT ship_id, ship_date FROM shipments PARTITION (p_max);1 row created.
SHIP_ID SHIP_DATE
---------- ------------------
1
1 row selected.FAQ
How do I fix ORA-14400 inserted partition key does not map to any partition?
Check the value in the message against HIGH_VALUE in USER_TAB_PARTITIONS. Add a partition that covers it, or use INTERVAL partitioning, a DEFAULT LIST partition, or a MAXVALUE partition.
How do I avoid adding partitions every month?
Use interval partitioning: ALTER TABLE … SET INTERVAL (NUMTOYMINTERVAL(1, 'MONTH')). Oracle creates new partitions as data arrives.
Why does a NULL value cause ORA-14400?
In RANGE partitioning NULL is treated as higher than any value, so only a MAXVALUE partition can hold it.
How do I find the partition ranges of a table?
SELECT partition_name, high_value FROM user_tab_partitions WHERE table_name = 'SALES' ORDER BY partition_position;
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0