Page 1 of 1

+= for SQL

Posted: Thu Aug 27, 2009 1:53 pm
by JellyFish
Like in PHP, is there a += assignment operator in SQL or something equivalent?

Re: += for SQL

Posted: Thu Aug 27, 2009 1:57 pm
by Darhazer
[sql]UPDATE TABLE SET FIELD = FIELD + 1;[/sql]

Re: += for SQL

Posted: Thu Aug 27, 2009 2:05 pm
by JellyFish
This is the way I'm doing it right now, but I was just wondering if there was another way, one that involves an operator of some kind. I was assuming that an operator would be faster for this, if one exists.