Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the syntax required for the creation of a cursor?



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

Post New Answer

More DB2 Interview Questions

What are the contents of dclgen?

0 Answers  


What is index cardinality?

3 Answers  


How to restart a DB2 program?

0 Answers   Cognizant,


What is the connection string to connect to the DB2 Database ?

0 Answers   MCN Solutions,


what is SPUFI ?

2 Answers  


How to connect to db2 database from windows command line?

0 Answers  


How can you quickly find out the # of rows updated after an update statement?

0 Answers  


What is the difference between Where and Having Clause

7 Answers   IBM, iFlex,


What is a clustering index ?

3 Answers  


What is runstats and reorg in db2?

0 Answers  


how to resolve -818 error. how to see timestamp token in load module and plan

4 Answers   IBM,


What are the various isolation levels possible?

0 Answers  


Categories