|
Posted by Simon on 06/17/05 15:35
> Hello,
>
> I have a table with "score" field.
> In some case, tho Scroe must be increased, normaly I would do this by
> first reading the current score, increasing it in the code then updateing
> it back to the filed, but I was wondering if there was an better way, to
> avoid extra queryes, like some function in the update commad jost to
> increase the current value for some amount without reading it first?
>
> I hope you understand what I mean :)
>
> Thank you in advance.
UPDATE mytable SET myfield = myfield+1 where (somevalue = someothervalue );
Simon.
[Back to original message]
|