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
What is dbrm? What it contains?
What does db2 mean?
Discuss about db2 bind?
Define check constraint.
What is bind package and plan in db2?
What does a deadlock mean in DB2?
How to run db2 command in windows?
How can you classify the locks in db2?
What is role in db2?
How do I add a column to a table in db2?
List out the data types available.
How do we specify index to include or not during bind process.
What is an instance in db2?
Explain how can you do the explain of a dynamic sql statement?
What is the information associated with sysibm.syslinks table?