How do you check for a null value in a db2 column?

Answers were Sorted based on User's Feedback



How do you check for a null value in a db2 column?..

Answer / guest

You use a null indicator on the colunm and if the null
indicator = -1 then the column has a null value.

Is This Answer Correct ?    32 Yes 0 No

How do you check for a null value in a db2 column?..

Answer / angoca

By querying the catalog
select nulls
from syscat.columns
where tabschema like 'XX%'
and tabname = 'YY'
and colname = 'ZZ'"

Or with the describe command
db2 describe table ZZ.YY

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More DB2 Interview Questions

What are simple, segmented and partitioned table spaces ?

1 Answers   TCS,


Where is the access path logic created by the DB2 Optimizer stored?

1 Answers  


What is buffrpool? Where we use it ?

2 Answers   Tesco,


What do you mean by storage group (stogroup)?

0 Answers  


how to unload different table data into different gdg files/ vsam files.

3 Answers  






How to retrieve rows from a db2 table in embedded sql?

0 Answers  


What is the difference between SYNONYM and ALIAS?

6 Answers   TCS,


How do you pull up a query which was previously saved in qmf?

0 Answers  


A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?

7 Answers   IBM,


In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)

2 Answers  


What are the functions in DB2?

3 Answers   Satyam,


How would you find out the total number of rows in a db2 table?

0 Answers  


Categories