Suppose if I need to update a column, how you do that using
cursor?
Answers were Sorted based on User's Feedback
Answer / bobby
continuation of previous answer,
after cursor declaration, open the cursor and fetch the cursor. When the condition for update is satisified isue EXEC SQL UPDATE CURRENT OF.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / sandy
EXEC SQL DECLARE X CURSOR FOR
SELECT * FROM ABC
FOR UPDATE OF <COLUMN> ==>If we know the column we would
like to update.
| Is This Answer Correct ? | 4 Yes | 0 No |
What is a storage group (stogroup)?
How to resolve -504 sql code in DB2?
How do I create a table MANAGER (EMP-NO, MANAGER) where MANAGER is a foreign key which references to EMP-NO in the same table? Give the exact DDL.
What is the difference between oracle and db2?
how to copy the host variables from ps file into cobol program other than include statement
What is an intent lock?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.
0 Answers ITC Infotech, Syntel,
What is a trigger in the db2 database?
Why db2 is called db2?
Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion?
how to resolve -811 sqlcode .give clear explaination
What is the cobol picture clause of the db2 data types date, time, timestamp?