Locking multiple records in PL/SQL
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Locking multiple records in PL/SQL

  1. #1
    Join Date
    Mar 2001
    Posts
    4
    Hi All

    Is it possible to lock multiple records in PL/SQL ?

    1) I cannot use "select ... for update" since the numbers of rows returned is not one and also it will vary.
    2) I cannot use "cursors ... for update" bcoz, I need to just lock a bunch of records so that no one touches it.
    3) I do not want to use lock table..., as this will not allow others to insert or update the records.

    Is there any way one can lock multiple records in PL/SQL and release these locks once my processing is complete ?

    Any help will be greatly appreciated.

    Thanks
    Bala

  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    SELECT...FOR UPDATE will work on as many records as you want. I don't see the problem.

    - Chris
    Christopher R. Long
    ChrisRLong@HotMail.Com
    But that's just my opinion. I could be wrong

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