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 |
Which one allows duplicate values Union or Union All ?
What is a Resource Control Table(RCT)? Describe its characteristics.
What is meant by AUTO COMMIT?
Before you give the explain statement, what are the prerogatives?
What is a cursor?
what is the steps followed in EXPLAIN Process or EXPLAIN command. (Explain is for identifying the optimized access path but how or what is the steps for doing the EXPLAIN)
What are the contents of a dclmgen?
What else is there in the PLAN apart from the access path?
ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE
What is the use of commit in db2?
How would you print the output of an SQL statement from SPUFI?
Is it possible to update a primary key value? If not, what is the error code given? If yes, can more than 1 primary key column be updated at a time?