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 |
What does DML stand for and what are some examples of it?
what is the name of the default db2 catalog database?
What else is there in the PLAN apart from the access path?
what's the error code for Unique Index Violation?
what is the role of the cursor in db2?
What is the difference between Primary key and unique index?
What is isolation level in db2?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
What is the use of reorg in db2?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
What is release/acquire in bind?
Under what circumstances will DB2 allow an SQL statement to update more than one primary key value at a time?