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 the input to PLAN? what is the input to DBRM?
What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.
Can you use max on a char column?
What is a clustered index?
What is a clustering index ?
what is the name of the default db2 catalog database?
What is DCLGEN?
What is lock contention?
Which component is responsible for db2 startup and shutdown?
What is alias in db2?
How can you split a table in to exactly half?
db2 query I have one table with the following details. SNO SNAME DOJ ------ -------------------- ---------- 10 KRISH 2007-03-19 20 REDDY 2007-05-19 30 RRRRR 2007-05-19 40 BBBBB 2008-05-19 50 CCCCC 2009-05-19 60 JJJJJ 2009-05-19 70 JJJJJ 2004-05-19 i want the output in the following format:( no of students joined in each year(no nedd to consider about month and date) year count --------- ---------- 2004 1 2007 3 2008 1 2009 2