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 syntax for creating a table in the db2 database?

0 Answers  


What are column-name qualifiers used?

1 Answers  


how to copy the host variables from ps file into cobol program other than include statement

1 Answers   Syntel,


What is cursor stability in db2?

0 Answers  


wht displays the number of times a query modified ?

2 Answers   TCS,






How can you classify the locks in db2?

0 Answers  


Hi Dude,this is Ram.could any one tell me aboue CURRENT OF clause in DB2. Thanks in advance.......

2 Answers  


why we go for SPUFI for creating tables or for sql queries?

4 Answers  


Write a query to retrive partial string.

2 Answers  


what is rebinding ?

1 Answers   IBM,


What is a clustering index?

2 Answers  


Which catalog table stores referential constraints?

1 Answers  


Categories