Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

How to handle null values in db2

Answers were Sorted based on User's Feedback

How to handle null values in db2..

Answer / lu

you need to declare binary indicator variable....
10 Ind-variable pic s(904) comp.

Is This Answer Correct ?    10 Yes 3 No

How to handle null values in db2..

Answer / biswamoy majumder

To insert a NULL, move -1 to the null indicator, To insert
a valid value, move 0 to the null indicator.
declare separately Null indictor variable in Working-
Storage section.
10 variable-NI pic s9(04) Usage comp.

Is This Answer Correct ?    5 Yes 0 No

How to handle null values in db2..

Answer / yuvaevergreen

>>"INDICATOR VARS .. ===> NO" indicates the presence of
null variables for the fields in the tables.
>>indicator variable should be declared of type s9(4) comp.
Move -1 to the indicator variable and use in sql.
exec sql
insert into employee(name)
ws-name-ind is the indicator variable which inserts null in
the field ws-name.

Is This Answer Correct ?    3 Yes 0 No

How to handle null values in db2..

Answer / ankitha

you can use value function or null indicators if you want to
handle nulls in program.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More DB2 Interview Questions

What is the purpose of using commit?

0 Answers  

What are the abend codes occour in ur latest PROJECT in DB2

2 Answers   Cap Gemini,

Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?

1 Answers  

What is a clustering index?

2 Answers  

I want to fetch the 10th row of a table which has been changed.How can I do it without going thru all the rows.

5 Answers  

What is the use of db2 optimizer?

0 Answers  

How do you stop a db2 database in linux?

0 Answers  

What is difference between rollback and commit?

0 Answers  

how can u retrieve the data from null values using applicaion program.

3 Answers   TCS,

Which catalog table stores referential constraints?

1 Answers  

How are write I/Os from the buffer pool executed?

1 Answers  

how to resolve -811 sqlcode .give clear explaination

3 Answers   IBM,