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
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 |
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 |
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 |
How could one combine a set of incremental image copies into a single copy?
How to check last update on table in db2?
what is sql abend code -801,-802?
My cobol program(not having any sql statements) is calling another cobol program ( having sql statements), what is needed for compilation and run in jcls .
Mention a credible reason why select* is never given preference in an sql program that has been embedded.
we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?
How does db2 sample database connect?
i want to maintain uniqueness on pdf without make lf??????????
What is meant by the attachment facility?
What is copy book?
What is the meaning concurrency in the db2 database?
How can record locking be achieved in those DB2 versions which do not support it?