What is the syntax required for the creation of a cursor?
Answer / 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 |
What are the contents of dclgen?
What is index cardinality?
How to restart a DB2 program?
What is the connection string to connect to the DB2 Database ?
what is SPUFI ?
How to connect to db2 database from windows command line?
How can you quickly find out the # of rows updated after an update statement?
What is the difference between Where and Having Clause
What is a clustering index ?
What is runstats and reorg in db2?
how to resolve -818 error. how to see timestamp token in load module and plan
What are the various isolation levels possible?