DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: DELETE in current cursor position

  1. #1
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343

    Hi all,

    How do I delete the record at my current cursor position, is there anything similar to 'WHERE CURRENT OF' clause as we have for Update.

    Shiva.

  2. #2
    Join Date
    Aug 2000
    Posts
    462
    You could step through your procedure, capturing rowid info into a PL/SQL table, then do delete operation after exiting cursor FOR loop . . .

  3. #3
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530
    Hi,
    There is a clause WHERE CURRENT OF when u declare a explicit cursor.
    What this clause does is that it will update or delete the current row where the cursor is pointing to.This is beneficial as Oracle doesnot have to search for ROWID in order to update or delete the row.Where the pointer of the cursor is there ,it will update/delete the row in the active set.

    e.g. cursor c1
    is select * from emp
    for update of sal where current of;

    If u have any doubts please be free to write to me at
    rohitsn@orasearch.net

    Regards,
    Rohit Nirkhe,Oracle DBA,OCP


  4. #4
    Join Date
    Jul 2000
    Posts
    296
    You can use the WHERE CURRENT OF clause for updates and for deletes.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width