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 kind of database is db2?
Before you give the explain statement, what are the prerogatives?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
How to get Top 10 Salaries from a Table
how to resolve -811 error. give clear explination
What is the difference between nvl and coalesce?
WHAT IS NULL INDICATOR ? WERE IS THIS USED? AND IF IT IS USED IN FILES CONCEPT? HOW DO WE USE IT?
What is image copy?
Define db2.
What happens to the PLAN if index used by it is dropped?
What is a collection in db2?
What does db2 stand for?