QUICK ANSWER
A NULL was assigned to a NOT NULL column, or a NOT NULL column without a default was left out of the INSERT or view.
LIKELY CAUSES, IN THE ORDER OF THIS ENTRY
- A null INSERT or UPDATE value is given for a NOT NULL column.
- A SET transition variable statement sets NULL for a NOT NULL column without WITH DEFAULT.
- DEFAULT is used for a NOT NULL column declared without WITH DEFAULT.
- The INSERT column list, or the view used, omits a NOT NULL column without WITH DEFAULT.
- A null insert value is given for a ROWID column.
CHECKED 14 Nov 2026 IBM: Db2 13 - Codes - SQLCODE -407 | Db2 for z/OS 13.0.0
MOST LIKELY
A null INSERT or UPDATE value is given for a NOT NULL column.
FIRST CHECK
Look at the table definition to find columns that are NOT NULL or of type ROWID.
TRY IT ▸
Site search
What it means
The column named in the message cannot hold NULL, but the statement tried to give it one, directly or through DEFAULT or by omitting it.
The statement is not processed.
Typical causes
- A null INSERT or UPDATE value is given for a NOT NULL column.
- A SET transition variable statement sets NULL for a NOT NULL column without WITH DEFAULT.
- DEFAULT is used for a NOT NULL column declared without WITH DEFAULT.
- The INSERT column list, or the view used, omits a NOT NULL column without WITH DEFAULT.
- A null insert value is given for a ROWID column.
How to fix it
- Look at the table definition to find columns that are NOT NULL or of type ROWID.
- Correct the statement so each such column gets a valid non-null value or is supplied correctly.
Suggest a tool or report a wrong answer · How it works and why it is safe
No mail app opens? Write to hello@mainframepath.com . Please do not send confidential code or data.