How to fix the Oracle error PLS-00218: a variable declared NOT NULL must have an initialization assignment?
In this post, you’ll learn more about the Oracle ErrorPLS-00218: a variable declared NOT NULL must have an initialization assignment with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PLS-00218: a variable declared NOT NULL must have an initialization assignment
Reason for the Error PLS-00218: a variable declared NOT NULL must have an initialization assignment
In general, variables that have no initialization clause in their declaration are automatically initialized to NULL. This is illogical for NOT NULL variables; therefore, an initialization clause is required.
How to fix the Error PLS-00218: a variable declared NOT NULL must have an initialization assignment ?
You can fix this error in Oracle by following the below steps
Add an initialization clause to the variable declaration. If the initilization is too complicated for the syntax, one can add a function call (in a later release).
Leave Your Comment