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 difference between oracle and db2?
How to find the number of rows in a db2 table?
How can you count the number of rows from a table tab?
What is null in db2?
What is the difference between cursor stability and repeatable read isolation levels?
Are view updateable?
What is bind in db2?
What are bind parameters in db2?
What is a buffer in memory?
What is db2?
Name the various locking levels available?
What is schema in db2?
What type of database is db2?
what are bind concepts in db2 cobol?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?