What is the syntax required for the creation of a cursor?
Answer Posted / prasad
Example For cursor Syntax:
Declare Cursor:
EXEC SQL DECLARE CUST_ITM CURSOR
FOR
SELECT
OWN_CUS_NO,
OWN_CUS_ITM_SUF_NO
FROM
NPJXTII
WHERE SCK_NO = :SCK-
NO
AND SCK_DT = :NPS-ORIG-TRANS-
DT
AND SCK_LN_ITM_SEQ_NO = :SCK-LN-ITM-SEQ-
NO
END-
EXEC.
Open Cursor:
EXEC SQL OPEN CUST_ITM
END-EXEC.
Fetch Cursor:
EXEC SQL FETCH CUST_ITM
INTO :OWN-CUS-NO,
:OWN-CUS-ITM-SUF-NO
END-EXEC.
Close Cursor:
EXEC SQL CLOSE CUST_ITM
END-EXEC.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
How many types of page locks can be held in db2?
What is explain plan in db2?
Is schema the same as database?
How can deadlocks be resolved?
What is multi row fetch in db2?
Mention the location where the output received from explain statement is stored.
What is the role of data manager in the db2 database?
i want to maintain uniqueness on pdf without make lf??????????
What is a db2 collection?
What is the result of open cursor statement?
How do I connect my db2 database to ibm?
What is clone table?
What is data manager?
What is cobol db2?
How to view db2 table structure?