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
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
Explain the contents that are a part of dclgen.
How to resolve deadlock issue
What is dbrm? What it contains?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
Define check constraint.
How to get the ddl of a table in db2?
What is an instance in db2?
What is buffer pool?
Explain packages.
Define buffer pool.
How to compare data between two tables in db2?
How can you quickly find out the # of rows updated after an update statement?
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
What is a bind in db2?