Oracle 23.26SQLLab-verified · 2026-11-29

ORA-14400: inserted partition key does not map to any partition

The row's partition key value does not fall into any partition of the table, so Oracle has nowhere to store it.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-14400: no partition found in table LAB_A.SALES for inserted partition key "2027-01-05T00:00:00"

Jump to a cause

  1. 01A date beyond the last RANGE partition (new year arrived)
  2. 02A monthly partitioned table where nobody added next month's partition
  3. 03A LIST partition value that is not listed
  4. 04NULL in the partition key column

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
Setuprun as lab_a
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')
);
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO sales VALUES (1, DATE '2027-01-05', 100);
✕ ERROR
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/
Checkrun as lab_a
SELECT partition_name, high_value FROM user_tab_partitions WHERE table_name = 'SALES' ORDER BY partition_position;
OUTPUT
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.
Fixrun as lab_a
ALTER TABLE sales ADD PARTITION p2027 VALUES LESS THAN (DATE '2028-01-01');
OUTPUT
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.

After the fixrun as lab_a
INSERT INTO sales VALUES (1, DATE '2027-01-05', 100);
SELECT sale_id, sale_date FROM sales PARTITION (p2027);
✓ SUCCESS
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
Setuprun as lab_a
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')
);
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO gl_journal VALUES (1, DATE '2026-12-01', 500);
✕ ERROR
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/
Fixrun as lab_a
ALTER TABLE gl_journal SET INTERVAL (NUMTOYMINTERVAL(1, 'MONTH'));
OUTPUT
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.

After the fixrun as lab_a
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';
✓ SUCCESS
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
Setuprun as lab_a
CREATE TABLE customers (cust_id NUMBER, region VARCHAR2(10))
PARTITION BY LIST (region) (
  PARTITION p_seoul VALUES ('SEOUL'),
  PARTITION p_busan VALUES ('BUSAN')
);
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO customers VALUES (1, 'DAEGU');
✕ ERROR
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/
Fixrun as lab_a
ALTER TABLE customers ADD PARTITION p_others VALUES (DEFAULT);
OUTPUT
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.

After the fixrun as lab_a
INSERT INTO customers VALUES (1, 'DAEGU');
SELECT cust_id, region FROM customers PARTITION (p_others);
✓ SUCCESS
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
Setuprun as lab_a
CREATE TABLE shipments (ship_id NUMBER, ship_date DATE)
PARTITION BY RANGE (ship_date) (
  PARTITION p2026 VALUES LESS THAN (DATE '2027-01-01')
);
OUTPUT
Table created.
Reproducerun as lab_a
INSERT INTO shipments VALUES (1, NULL);
✕ ERROR
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/
Fixrun as lab_a
ALTER TABLE shipments ADD PARTITION p_max VALUES LESS THAN (MAXVALUE);
OUTPUT
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.

After the fixrun as lab_a
INSERT INTO shipments VALUES (1, NULL);
SELECT ship_id, ship_date FROM shipments PARTITION (p_max);
✓ SUCCESS
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