Increment int value in sql update statement

Works like a charm in mysql:

UPDATE mytablename
SET myint = myint + 1
WHERE id = 1

Of course, decrement is also possible ;-)

Leave a Reply