ORA-01400 SQL Origin: Data OSI layer 7 · Application Last updated 13 Oct 2026

ORA-01400: cannot insert NULL into ("SCHEMA"."TABLE"."COLUMN")

A NULL was inserted into a NOT NULL column.

Exact message you may see cannot insert NULL into
Seen on: SQL

Meaning

Missing values, identity/sequence not wired up, or an empty string ('' is NULL in Oracle).

Common causes

  • Missing required value
  • Empty string treated as NULL
  • Id column without sequence/identity default

⚡ Quick fix

  1. Provide values
  2. Use identity columns or sequence defaults
  3. Remember '' = NULL in Oracle

Detailed fix by platform

SQL

  1. ALTER TABLE orders MODIFY (id DEFAULT orders_seq.NEXTVAL);

How to diagnose

  1. Column — Named in the message
  2. Value — Empty string?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

23502 — ERROR: null value in column "x" of relation "y" violates not-null constraint (PostgreSQL)235022627 — SQL Server: Violation of PRIMARY KEY constraint 'x'. Cannot insert duplicate key in object 'y'. (Msg 2627) (SQL)2627515 — SQL Server Msg 515: Cannot insert the value NULL into column 'X', table 'Y'; column does not allow nulls (SQL)515ALREADY_EXISTS — API Error: Resource already exists (ALREADY_EXISTS / resource_already_exists / 409) (API)ALREADY_EXISTSAutopilot — GKE Autopilot rejected the workload: resources adjusted / violates Autopilot constraints (Google Cloud / Firebase)AutopilotDbUpdateException — DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. (.NET)DbUpdateExceptionforeign key order — Foreign key violation caused by insert order or circular references (SQL)foreign key orderORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-01400

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.