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 do you mean by between and in? Is between inclusive of specified range values?
Explain the use of the WHERE clause.
in a table consist of 1000 records among that i was updated 145 record how could i know that ..list of recently updated record's and where could i see those updated record's....pls help me out....
What are the various data types available in db2?
How can you count the number of rows from a table tab?
Give a brief description of db2 isolation levels?
What is coalesce in db2?
Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?
Name some fields from SQLCA
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
What is the usage of open cursor command?
How is the SUBSTR keyword used in sql?