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 bind in db2?
How many types of page locks can be held in db2?
Which isolation level provides highest data integrity?
Why cursor is used in db2?
What is load utility in db2?
How do I delete a table in database?
Which component is used to execute the sql statements?
What is db2? Explain.
Is db2 a database?
What is nvl in db2?
How to get the ddl of a table in db2?
Is db2 relational database?
What are the prerogatives?
What is db2 command?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?