#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    France
    Posts
    1
    Rep Power
    0

    equivalent of for update nowait in Oracle


    Hi,

    What is the syntax in Firebird to have a lock on select (not on update, delete).

    For example :
    user 1 : select.. for update nowait

    user 2 : select .. for update nowait -> exception on lock select.

    I am this comportment in Oracle and I'd like to have the same in Firebird.

    Thanks.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Bucharest
    Posts
    72
    Rep Power
    11

    you have it!


    see http://www.ibphoenix.com/downloads/F...leaseNotes.pdf
    (1.5) Explicit locking
    Nickolay Samofatov
    The addition of the optional WITH LOCK clause provides a limited explicit pessimistic locking capability
    for cautious use in conditions where the affected row set is a) extremely small (ideally, a singleton)
    and b) precisely controlled by the application code.
    NOTE The need for a pessimistic lock in Firebird is very rare indeed and should be well understood
    before use of this extension is considered.
    Syntax
    SELECT ... FROM <sometable>
    [WHERE ...]
    [FOR UPDATE [OF ...]]
    WITH LOCK;
    around page 13/14
    Romania it's a beautiful country ... too bad that it's populated with ... peoples!

IMN logo majestic logo threadwatch logo seochat tools logo