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 the role of data manager in the db2 database?
Which command is used to remove all rows from a table?
What do you mean by commit and rollback?
If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2
Explain about cursor stability?
What is the reason behind not using select * in embedded sql programs?
What is a plan and package in db2?
What is cloudant database?
is it compulsory commitment control in journal?
How can record locking be achieved in those DB2 versions which do not support it?
Is db2 relational database?
List down the data types in the db2 database.
What is a storage group (stogroup)?
What is the meaning concurrency in the db2 database?
Are views updateable?