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 |
wht steps we need will coding cobol and db2 pgm ?
What is DCLGEN ?
how to check the table is empty or not?
What is host variable in db2 cobol?
What is deadlock in db2?
what happend with out using Commit,when closing cursor and program?
Explain about rct in db2?
how to delete perticular row from table for ex. how you will delete 3rd row from table please answer THANKS IN ADVANCE
What is innodb buffer pool?
wht are the restrictions for union ?
List out the three types of page locks that can be held.
What is the COBOL picture clause of the following DB2 data types: DATE, TIME, TIMESTAMP?