how to check the table is empty or not?
Answers were Sorted based on User's Feedback
Answer / vaneesh khurana
After executing the first query if you find SQLCODE = 100,
then the table is empty.
| Is This Answer Correct ? | 6 Yes | 1 No |
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 |
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 |
pls explain the precompilation process of cobol-db2 pgm
how can you copy records present in a flat physical file to a database file(physical file).please explain in rpg400 with a simple example
What does the RUNSTATS Utility do?
how many partitions are possible in partitioned tablespace? dont say 1-64. a)240 b)256 c)512 d)none
What is a page?
How to resolve -917 sql code in DB2?
What are concurrency issues?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What is null indicator in cobol db2?
What do you do to keep the cursor from closing after a commit?
What is explain in db2?
What happens to a cursor after a commit?