can we update the table by using cursors can anyone post
the query?

Answer Posted / diana

Yes you can update the table using cursor....
for eg: if you want to update 3 columns like A,B,C the you
can write as:

Update Table_name
Set A = :Host varaible(value)
B = :Host varaible(value)
C = :Host varaible(value)
where current of C1(Cursor name)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the contents that are a part of dclgen.

661


How do I copy a table in db2?

575


Explain the contention situations caused by locks?

594


What is dclgen (declaration generator)?

604


Can we delete records from view?

566






What is iseries database?

597


I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

2757


How do I change the column size in db2?

596


What is the use of db2?

588


When the like statement is used?

640


What is buffer pool?

614


Mention the definition of cobol in varchar field.

700


How does cobol compile db2 program?

610


What do you mean by between and in? Is between inclusive of specified range values?

670


When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?

3120