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 total syntax for fetch ? can any one please give
me all the details of fetch ? thx

Answers were Sorted based on User's Feedback



what is the total syntax for fetch ? can any one please give me all the details of fetch ? thx..

Answer / pandu

Exec SQL
Fetch<cursorname> into :<host variables>
End-exec.

correct me is am wrong?

Is This Answer Correct ?    11 Yes 0 No

what is the total syntax for fetch ? can any one please give me all the details of fetch ? thx..

Answer / sree

YES THE ABOVE SYNTAX IS CORRECT

IF THERE ARE MORE THAN ONE HOSTVARIABLES,IE IF THERE ARE
MORE COLUMNS IN THE DB2 TABLE

SYNTAX IS

EXEC SQL
FETCH CURSORNAME INTO :HOSTVARIABLE1 ,
:HOSTVARIABLE2 ,
---
---
:HOSTVARIABLEN
END-EXEC

Is This Answer Correct ?    11 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the database descriptor?

2 Answers  


What action db2 takes when a program aborts in the middle of a transaction?

0 Answers  


Q1. How will you use two different DB2 qualifiers in a single COBOL program? Suppose we have 2 tables EMP1 and EMP2 with same structure defined in two different DB2 qualifiers QUAL1.EMP1 and QUAL2.EMP2 now during first 15 days we want to use QUAL1.EMP1 and rest of the days QUAL2.EMP2  how will we do this.  We can create a single program and a single load for this program. 

2 Answers   RBS,


How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement

5 Answers   Syntel,


What are foreign keys?

1 Answers  


What is the purpose of using commit?

0 Answers  


How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?

2 Answers  


What is difference between rollback and commit?

0 Answers  


OUTER JOINS USED TO GET MATCHING AND NONMATCHING ROWS FORM 2 OR MORE TABLES BASED ON COLUMNS. SIMPLE JOINS ALSO DO THE SAME THEN WHAT IS THE USE OF OUTER JOINS.

1 Answers   Syntel,


we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?

2 Answers  


if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records

4 Answers   UST,


what are the bind parameters?

5 Answers   IBM,


Categories