I have 1000 rows in a db2 table.I want to update first 100
records,How do I do it?
Answer Posted / ananth
Declare a cursor like this in the application program
exec sql
Declare empcur cursor with hold for
select empno,empname from emp
for update of empsal
fetch first 100 rows only
end-exec.
this query will retrieve the first 100 rows and the cursor
is positiond at the first row in the resultent table.
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
How to find the number of rows in db2 tables?
What are the bind parameters ibm db2?
What is runstats and reorg in db2?
What are the uses of db2 optimizer?
Is db2 a programming language?
Explain db2.
What is db2 look?
What is meant by dclgen?
What is the syntax for seeing the columns and data types of a table in the db2 database?
What is a system catalog table in db2?
What is the physical storage length of time data type?
How do I delete a table in db2?
How do you eliminate duplicate values in db2?
How do I connect my db2 database to ibm?
What do you mean by commit and rollback?