Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Avoiding any locks in SQL Servers - read and understand....its magic.
On 26 Jan 2004, boston103_at_hotmail.com wrote:
> The constraint is right there, in the statement itself:
>
> update t1 set amount=amount-80 where (select
> t1.amount+t2.amount from t1 join t2 on t1.id=t2.id) > 0;
How is the constraint in your statement? You have only restricted the selected rows. You have said nothing about what should be done with the rows on update.
What if I type:
update employee set salary = salary*.1 +salary where salary < min_wage;
With your argument, the above should fail.
-- Galen BoyerReceived on Mon Jan 26 2004 - 14:16:09 CST
![]() |
![]() |