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 db2 look?
What is db2 command?
Is db2 a database?
Mention data types used in db2 ?
Explain what are the various isolation levels possible?
run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...
What is consistency token in db2?
What is null value in db2?
what are bind concepts in db2 cobol?
Define db2 and its databases?
What r the comman abends in db2, jcl and cobol???????
What is alias in db2?
What os does db2 run on?
File not opened because library is *PROD and debug is UPDPROD(*NO). ? what may be the reason? how to solve it..?
What is dclgen (declaration generator)?