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 is a trigger and types of triggers
can all users have the privilage to use the sql statement select * (dml)?
What is the difference between IN subselects and EXISTS subselect?
What types of tables are there in the db2 database?
What are the three lock types?
what is contained in the DB2 node lock file? A) data base names B) data base users names C) license keys D) server names
Which one allows duplicate values Union or Union All ?
What's the difference between DB2 active log and archive log? Thanks a lot...
if there is a table with huge number of records and if i want to extract only first 3 records from the table, what query i have to provide to retreive first 3 records
What is the difference between spufi and qmf?
How to find schema of a table in db2?
What will the FREE command do to a plan?