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
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
How to check last update on table in db2?
Which component is used to execute the sql statements?
What is package in db2 mainframe?
What is a db2 table?
Are views updateable?
What is the syntax for creating a table in the db2 database?
How is deadlock resolved?
How many types of page locks can be held in db2?
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
Explain in detail about buffer manager and its functionalities?
What is check constraint in db2?
What is the difference between cursor stability and repeatable read isolation levels?
Define check constraint.
What is runstats and reorg in db2?