Do we need cursor for Count(*)?

Answer Posted / yaswanth

we will use cursors when we have situation like the query
returning multiple rows but in this case
select Count(*) from EMP table where EMPNAME='some' will
return only one row, i.e how many rows it found with
EMPNAME='some' eg:3 or 4 or 5 ... so there is no concept of
cursor here

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we update view in db2?

746


What is rebind in db2?

759


How to view db2 table structure?

773


What is db2 stogroup?

869


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

884


Who uses db2?

740


What are bind parameters in db2?

783


What is runstats db2?

751


What is role in db2?

767


How to find the number of rows in db2 tables?

784


what is the sqlcode -501

12055


What is precompiler in db2?

755


What is the difference between db2 and oracle?

857


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

899


What is null indicator in cobol db2?

758