how to check the table is empty or not?

Answer Posted / sriram


EXEC-SQL
SELECT 1
INTO :X
FROM TAB1
END-EXEC
X is defined as s9(4) comp value zeroes
So, if there is a row in the table (i.e. the table is not
empty), 1 gets moved to variable X.
Did not have resources to run the query and validate ,



Please let me know if I am wrong

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is db2? Explain.

804


What is isolation level in db2?

781


What is a trigger in the db2 database?

830


What is reorg and runstats in db2?

970


What is temporal table in db2?

820


Explain the contents that are a part of dclgen.

888


Explain the function of data manager.

820


Is it possible using max on a char column?

878


How to rename a table in DB2 ?

834


What is cloudant database?

857


What is a db2 table?

783


What is db2 bind process?

956


What is a db2 schema?

997


How connect db2 database to datastage?

1004


List out the data types available.

931