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

what is difference between Static call and Dynamic call? How does it function?

1 Answers   Syntel,


What is lock escalation in db2?

0 Answers  


What are the functions of Bind?

2 Answers   Amdocs, IBM,


What is the physical storage length of time data type?

0 Answers  


Explain db2.

0 Answers  






Is it possible using max on a char column?

0 Answers  


When is the skeleton cursor table created?

1 Answers  


suppose in my table 10 rows are there , i want to update odd rows salary as 90000 ? how u do it ? any one help me ? what do we use here cursor-fetch or normal sql ?

5 Answers   IBM,


Is db2 free?

0 Answers  


which authority can be granted to group of users using the GRANT stmt? A) SYSCTRL B) SYSADM C) DBCTRL D) DB ADM

3 Answers   Accenture,


Is schema the same as database?

0 Answers  


When is the authorization check on DB2 objects done - at BIND time or run time?

1 Answers  


Categories