UPDATE statement and database locks
444035Oct 25 2005 — edited Nov 15 2005Hello everybody,
I have a problem related to an UPDATE statement. There are two applications, let say A and B.
Application A executes:
update some_table
set some_field = 'value_A',
where pk_field=1
no commit!
Application B executes:
update some_table
set some_field = 'value_B',
where pk_field=1
Now application B is locked and wait until application A executes a commit.
THIS IS A PROBLEM!
I know one way to solve this problem:
Both applications should execute "select for update nowait" before
updating a row.
Is there any other solutions? Something like "update nowait"?
thanks in advance
Dmitri Geller
DGeller (at) lhsgroup dot com