can we update the table by using cursors can anyone post
the query?
Answer Posted / amar
DECLARE
INT NUMBER:=0;
CURSOR C1 IS
SELECT COL1,COL2 FROM TABLE_NAME;
BEGIN
FOR RC IN C1 LOOP
UPDATE TABLE_NAME SET COL_NAME=RC.COL1,COL_NAME=COL2;
CNT:=CNT+1;
END LOOP;
END;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the uses of db2 optimizer?
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
What is explain in db2?
What is the role of data manager in the db2 database?
Outputs of explain are with matchcols = 0. What does this signify?
What is the physical storage length of timestamp data type?
Is it possible using max on a char column?
What is role in db2?
What does runstats do in db2?
What is bind in db2?
What do you mean by commit and rollback?
Mention the way of highlighting as well as putting a cursor to use in a cobol program.
How can we read records for specific member in CL? AND rpg?
What is db2 connect?
Explain about rct.