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 is a db2 table?
What is null value in db2?
What is a dbrm in db2?
What is sqlca?
How can you do the explain of a dynamic sql statement?
What parameters are used to control the free space in DB2?
What is db2 optimizer?
How do I delete a table in db2?
Give a brief description of db2 isolation levels?
What are packages in db2?
What is a bind in db2?
How to access db2 tables in mainframe?
What is the difference between bind and rebind in db2?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
Who uses db2?