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.
Answers were Sorted based on User's Feedback
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 |
Answer / nagendra
before open cursor we can populate that value
ex move 1220 to adb-dept
Is This Answer Correct ? | 2 Yes | 1 No |
What is the format (internal layout) of ?TIMESTAMP??
Explain about open switch business continuity software?
How does DB2 determine what lock-size to use?
What is the role of the data page in the db2 database?
what is differnece between DROP TABLE & DELETE TABLE .
What do you mean by NOT NULL WITH DEFAULT? When will you use it?
if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)
What is buffrpool? Where we use it ?
What is cascading rollback?
What are the contents of a dclmgen?
What is dynamic SQL?
What is a trigger in the db2 database?