Say CUST Table contains records like:
CUSTNO CUSTNAME CUSTLOC
100 ABC SSS
200 XYZ
300 PQR
400 MNO WWW
500 CVV
-------------
-------------
Now write a query to retrieve all records with CUSTLOC no
data.

Answers were Sorted based on User's Feedback



Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS ..

Answer / vineet chauhan

no you have to use IS keyword as:


SELECT * FROM CUST
WHERE CUSTLOC IS NULL

Is This Answer Correct ?    11 Yes 2 No

Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS ..

Answer / madhuri tungal

In the CUSTLOC field the no data is represented by SPACES
but not by .... i.e NULL VALUE

Hence the query would be,

SELECT * FROM CUST WHERE CUSTLOC IS SPACES;

Is This Answer Correct ?    0 Yes 3 No

Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS ..

Answer / sharat

EXEC SQL
SELECT * FROM CUST
WHERE CUSTLOC = NULL
END-EXEC.
Can anyone let me know whether the query coded above is right.

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More DB2 Interview Questions

In a DB2-CICS program which is acts as co-ordinator and which is participant?

1 Answers   IBM,


What are db2 tables?

0 Answers  


What is meant by repeatable read?

4 Answers  


What is bind package and plan in db2?

0 Answers  


What is auditing?

2 Answers  






What is the purpose of the DSNC transaction ?

1 Answers  


Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.

9 Answers   Cap Gemini,


What's The Percentage Free Space ?

0 Answers   IBM,


What r the comman abends in db2, jcl and cobol???????

0 Answers   Mphasis,


Can a array declared with an index be displayed(readable format) in spool?

4 Answers   Syntel, UST,


I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?

2 Answers  


What are the bind parameters ibm db2?

0 Answers  


Categories