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 does sqlcabc has?
What is buffer pool in the db2 database?
What os does db2 run on?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
What is the syntax for FETCH in DB2 ?
What is dbrm? What it contains? When it will be created?
Explain the contention situations caused by locks?
Explain the benefits you can get from mainframe connect?
When reorg is used?
What is db2 purescale?
What is release/acquire in bind?
What is ibm db2 used for?
How to check last update on table in db2?
What are iseries servers?
Which command is used to connect to a database in DB2 ? Give the Syntax.