How to resolve the -305 error code in DB2?
And also please let me know, how to resolve the db2 error
codes.
Answer Posted / vikram and mangesh
The null value is the concept of DB2 and your application
program does not understand the null concept, so to handle
the null value in our application program we use null
indicator.
Null indicator will have following values(depending upon
what values comes from DB2).
0 means the column is not null and any actual value stored
in the column is valid.
-1 means column is set to null.
-2 means column was set to null as the result of a data
conversion error.
in above scenarion if your table contains nullable columns
(means the column can have null values) and in aplication
program you dont mentioned the null indicator,you will get
sql code -305.
For a NOT NULL column there is no need of null indicator as
there cannot be null at any point of time and if you dont
give any value then you will get SQL code -407.
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
What is drop table?
What is the syntax for seeing the columns and data types of a table in the db2 database?
Outputs of explain are with matchcols = 0. What does this signify?
What is bind in db2?
Is the primary key a clustered index?
Which command is used to remove all rows from a table?
What is a collection in db2?
What is access path in db2?
What parameters are used to control the free space in DB2?
List out the three types of page locks that can be held.
Highlight all the advantages that are attached to a package.
What is db2 purescale?
Explain about rct.
Mention the different locking levels that are available in db2.
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?