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 |
select distinct(empid),distinct(dept),name from EMP will the above query work?
What are delete-connected tables?
Can a array declared with an index be displayed(readable format) in spool?
suppose in my table 10 rows are there , i want to update odd rows salary as 90000 ? how u do it ? any one help me ? what do we use here cursor-fetch or normal sql ?
On the create tablespace, what does the CLOSE parameter do?
What is plan in cobol db2?
Mention the downsides of page level lock.
What are foreign keys in db2?
What is db2 command?
What does DSNDB07 database do?
What is the usage of open cursor command?
How do you prepare a COBOL + DB2 program from coading till execution ?