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 GDG: is it poosible to copy records from a file which utilizes some 100 cylinders to a gdg whose model is defined as trk(1,0) and also it possible to copy 100 bytes file to 80 bytes file?
Define db2.
If the main program has only cobol statements and subprogram has the db2 statements what is the procedure for precompilation. for which program we need to do the precompilation
Q1. How will you use two different DB2 qualifiers in a single COBOL program? Suppose we have 2 tables EMP1 and EMP2 with same structure defined in two different DB2 qualifiers QUAL1.EMP1 and QUAL2.EMP2 now during first 15 days we want to use QUAL1.EMP1 and rest of the days QUAL2.EMP2 how will we do this. We can create a single program and a single load for this program.
How many databases are there?
List out the data types available.
How to resolve the -305 error code in DB2? And also please let me know, how to resolve the db2 error codes.
What is view db2?
Mention data types used in db2 ?
wht is d/f b/w inner join and outer join ? d/f group by and order by having by ?
How to execute stored procedures?
Define buffer pool.