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 is cursor in dbms?
What are the uses of db2 optimizer?
EXPLAIN has output with MATCHCOLS = 0. What does it mean?
What is a Database Request Module(DBRM)?
What is db2 plan table?
Explain how can you do the explain of a dynamic sql statement?
What is the maximum number of tables that can be stored on a Partitioned Table Space ?
What is error -818 in db2. where can you find the timestamp of the DBRM and the source code.( precompile puts the timestamp on dbrm and source code correct?)
What is reorg?
How do you define a correlated name?
What is image copy in db2?
How to execute stored procedures?