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
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
How to create db2 table in mainframe?
What is the use of predicate?
What is a db2 schema?
What is package in db2 mainframe?
What is the maximum size of a char data type in db2?
What is the meaning concurrency in the db2 database?
What is database manager in db2?
Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference
Is it possible to create an Instance in DB2 using DB2 Control Center ?
How do you concatenate the firstname and lastname from emp table to give a complete name?
How to retrieve rows from a db2 table in embedded sql?
What is cursor with hold option in db2?
What does db2 blu stand for?
What is an instance database?