Informix Error -2834: NULL cannot be used as the default. It is already the default if you specify nothing.
Cause and resolution
NULL cannot be used as the default. It is already the default if you specify nothing.
This ATTRIBUTES statement contains a DEFAULT clause that specifies NULL. Either delete the clause, or specify another value.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2834 fires when an ATTRIBUTES statement's DEFAULT clause explicitly specifies NULL — per
the official guidance, NULL is already the implicit default when no DEFAULT clause is
present at all, making an explicit DEFAULT = NULL redundant and disallowed.
DEFAULTexplicitly set toNULL, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the
DEFAULTclause entirely, per the official guidance, sinceNULLis already the default with no clause at all. - Or specify an alternative, non-
NULLdefault value, per the official guidance, if a genuine default is actually intended.
Examples
An explicit NULL default
ATTRIBUTES
status = order_status, DEFAULT = NULL;
-- -2834: NULL is already the default; this is redundant and disallowed
Corrected — remove the clause
ATTRIBUTES
status = order_status;
Diagnostic Checks
- Check every
DEFAULTclause for an explicitNULLvalue, and remove the clause (or supply a genuine non-NULLdefault) if found.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2834 in this set yet.
DEFAULT = NULL is redundant and disallowed — remove the clause, or supply a real default
value.