

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the purpose of “NOT NULL WITH DEFAULT” clause used in DB2 table column?
When we define the DB2 table, we can declare any column as “NOT NULL” which means that in any case this column cannot store NULL value.
Now if we try to store a NULL value in this column in our COBOL-DB2 program using -1 value in the NULL indicator then our query will fail. In this case the SQLCODE field of SQLCA will give the error code as -407. As per the IBM documentation -407 error code states that−
“AN UPDATE, INSERT, OR SET VALUE IS NULL, BUT THE OBJECT COLUMN CANNOT CONTAIN NULL VALUES”.
- Related Questions & Answers
- What is the purpose and usage of “FOR UPDATE OF” clause in a COBOL-DB2 program
- What is the purpose and usage of “WHERE CURRENT OF” clause in a COBOL-DB2 program?
- Purpose and table creation syntax of “Created temporary table”
- Purpose and table creation syntax of “Declared temporary table”
- Insert default into not null column if value is null in MySQL?
- Create a column on my table that allows null but is set by default to empty (not null)?
- What is the usage and purpose of DCLGEN and host variables used in COBOL-DB2 program
- What is the result of count function in the NULL value present in DB2 table?
- What is the purpose of a default constructor in Java?
- How to Replace null with “-” JavaScript
- “Where” clause not working while updating database record in ABAP
- Adding a column whose value is not null by default in MySQL?
- What is NULL check and insertion rule in a DB2 table?
- How to filter data using where Clause and “IS NOT” in Android sqlite?
- What is “Parameters without defaults after default parameters in JavaScript”
Advertisements