Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Fun with a non-trivial update statement
claggett_at_my-dejanews.com wrote:
> In MS SQL the statement looks somthing like:
>
> UPDATE A
> SET A.Value = A.Value * B.Value;
> FROM mytable A, mytable B
> WHERE A.ID = B.ID - 1
>
More trivial than you think :
UPDATE mytable A
SET A.Value = (SELECT A.Value * B.Value
FROM mytable B WHERE A.ID = B.ID - 1)
--
Regards,
Stéphane Faroult
Oriole Corporation