Do we need cursor for Count(*)?
Answers were Sorted based on User's Feedback
Answer / nak
No,Count(*) will give u the number of record in a table.
Ex: select Count(*) from EMP table where EMPNAME='sunil'
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / 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 |
Answer / shravan kumar.p
no need..
select count(*) from the emp.
it will give the total no of rows in a table..
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sachin borase
select 8 from table fetch first 3 rows only
Is This Answer Correct ? | 0 Yes | 5 No |
In cursor program-1 can we create another cursor program-2 inside the cursor program-1.If yes how/no why ?
can any one expalin check point with an example?
database DSNDB01 means a.db2 catalog b.db2 directory c.BSDS d.active logs answer with reason please
What is the maximum length of sqlca?
why db2 is called as universal database?what is the storage capacity of db2v9 n what are the advantages of db2
What is a plan and package in db2?
What is the cascade rule and how does it relate to deletions made with a subselect?
How to resolve -504 sql code in DB2?
Explain how can you do the explain of a dynamic sql statement?
What value the host varible will contain , if null indicator value is -2 ? Will it contain the truncated value or nothing will move ?
Explain various types of locks in db2?
what is dynamic cursor?gives syntax for this?