in the CURSOR declare statement, if i am using an where
clause and trying to compare the value with a host-varialble.
EXEC SQL DECLARE C1 CURSOR FOR
SELECT DEPTNO, DEPTNAME, MGRNO
FROM DEPARTMENT
WHERE ADMRDEPT = :ADM-DEPT
Where would i need to provide value to this host-variable in
the where clause. how could i pass value to this
host-variable to check it.
Answer Posted / mandar panse
Before opening this cursor thru OPEN <cursor_name>. because
when we open the cursor, it fetches all matching records
from table and stores them in buffer. so it evaluates that
where clause while opening the cursor.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is the result of open cursor statement?
What is a storage group (stogroup)?
What is the max length of sqlca?
Explain what are the various isolation levels possible?
Mention the definition of cobol in varchar field.
What is an instance database?
What is phantom read in db2?
How to resolve deadlock issue
What type of database is db2?
What is a bind card?
What is access path in db2?
What is the difference between using bind () and rebind () methods of naming class?
What is a plan and package in db2?
Differentiate between cs and rr isolation levels? Where do you specify them?
How to execute stored procedures?