what is the difference between normal select query and
currosor
Answers were Sorted based on User's Feedback
Answer / jagan
using select in embedded sql with where clause should fetch
only one row , but cursor can be used when we need more rows
to be retrieved one at a time.
In case more than one row is retrieved in a select clause it
will throw -811 sql error.
| Is This Answer Correct ? | 28 Yes | 5 No |
Answer / vinay srivastava
Normal select Query fetches all rows in one go while cursor
fetches one row at a time.
| Is This Answer Correct ? | 10 Yes | 17 No |
quary for 1> fetch last record 2> fetch in reverse order 3> fetch last 5 row 4> fetch second last record (their is no primary key) i think concept of count can be use for this in 4th
if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)
What are the uses of db2 optimizer?
What is a NULL value? What are the pros and cons of using NULLS?
Where do you specify them?
can any one expalin check point with an example?
How Plan is created while executing the query using SPUFI?
Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?
What is database reorganization?
how 2 resolve the -311 sqlcode
What are the various locking levels available?
wht steps we need will coding cobol and db2 pgm ?