Query on positioned delete



IBM's flagship relational database management system

Query on positioned delete

Postby cet2002 » Wed Oct 24, 2012 11:56 am

Hi all,

I have the following query related to positioned update/delete using cursor.

As per my understanding , for performing a positioned update using cursor (in a cobol-db2 program)
-- While declaring the cursor , the "FOR UPDATE OF" clause need to be used
-- Later while updating the specific row , "WHERE CURRENT OF cursor name" need to be used

My query is
-- In case of positioned delete , do we need to give "FOR DELETE OF" similar to the above case?
-- Actually , the program code ( a notepad version) which I am having with me has a positioned delete
but it is making use of "FOR UPDATE OF" itself in cursor definition
-- So does this mean that "FOR UPDATE OF" is commonly used for both positioned update/delete?

Please clarify.

Thanks in advance
cet2002
 
Posts: 2
Joined: Thu Nov 03, 2011 10:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Query on positioned delete

Postby iamamainframer » Wed Oct 24, 2012 3:14 pm

So does this mean that "FOR UPDATE OF" is commonly used for both positioned update/delete?


Yes...
iamamainframer
 
Posts: 7
Joined: Sun Feb 27, 2011 11:54 am
Has thanked: 1 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post