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...

Hi , I am posting some interview ques .

what is the use of cursors ? what is the diff between
select and cursor ? bith are used for data retrival ..
rite?

Answer Posted / reddy

cursors are used to retrieve multiple rows . Cussors will
retrieve one row at a time and save the data in the
hostvariables.For retreiving the 2 nd row, we need to
repeat the loop.the same process is continued at the end of
data.

select stmt will retrieve multiple rows at a time. assume
that there are 10 rows in a table.
EX: EXEC SQL
SELECT empno , ename into :hvempno ,:hvename from emp;
END EXEC;

Here the above sql query reults all the 10 rows. But , the
host variables will hold only one row of data.the remaining
9 rows will not be stored any where.

hope this may help u

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which isolation level provides maximum concurrency?

1150


What is reorg and runstats in db2?

1213


What is a bind card?

1214


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

2176


Why select is not preferred in embedded sql programs?

1296


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

1100


Which components manage deadlocks in db2?

1063


How to retrieve rows from a db2 table in embedded sql?

1384


What is the reason behind not using select * in embedded sql programs?

1105


Differentiate between cs and rr isolation levels? Where do you specify them?

1065


What r the comman abends in db2, jcl and cobol???????

2250


File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?

2925


How to take backup of table in db2?

1069


Explain dclgen.

1192


How is deadlock resolved?

1144