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 does DML stand for and what are some examples of it?

3 Answers   IBM,


1. what if null values retrived from database and no null indicator mentioned in query. What is sql code.

1 Answers   Cap Gemini,


What will the COMMIT accomplish?

5 Answers  


What is the function of logging in the db2 database?

0 Answers  


what is the use of commit ? and what is the syntax?

2 Answers   Deloitte,






what is check point and restart Logic ? why do we go for that ??

2 Answers   CGI, UST, Xansa,


what is the certification that has a good value for a practioner in mainframes but not habving much knowledge on db2 related stuff?

2 Answers  


I am getting a error multiple row fetched while executing a Cobol-DB2 program.How can I solve it without using a cursor.

8 Answers  


what is different three logs in DB2?

1 Answers   Syntel,


Which component is responsible for db2 startup and shutdown?

0 Answers  


Is schema the same as database?

0 Answers  


what is the difference between normal select query and currosor

2 Answers   Cap Gemini, TCS,


Categories