Select empno, sal from emptbl where empno < 101.By this
query can we fetch first 100 recs? where empno is primary
key.It won't throw -811 error? if it wont,then what is use
of cursor technique while fetching first 100 recs.
Please need more clarification.
Answers were Sorted based on User's Feedback
Answer / kingmanish
Yes this query will fetch multiple records.
If tried to fetch these records in variables in a sql query
it will give -811 error.
In order to be able to handle these multiple records we
have to use cursor.
Now using cursor we can process each of these records one
at a time and thus cursors come handu here.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / madhu t
If the to fetch empno and sal from emptble is written in
embedded sql then it will give sqlcode -811.
yes this query fetches first 100 records of employee table.
| Is This Answer Correct ? | 3 Yes | 1 No |
what's the error code for Unique Index Violation?
Which catalog tables contain authorization information?
What is the SQL Communications Area and what are some of its key fields?
how do u update the faltfile into db2 table ?
In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.
Which DB2 catalog tables are used to produce a list of table column by table for all tables in a database?
What are the 4 environments which can access DB2 ?
What is EXPLAIN?
What is the syntax for FETCH in DB2 ?
What is a synonym ?
What are the functions in DB2?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?