How to add 1 to the value of a column of an existing row in mysql
Posted
by mithun1538
on Stack Overflow
See other posts from Stack Overflow
or by mithun1538
Published on 2010-04-21T04:34:08Z
Indexed on
2010/04/21
4:43 UTC
Read the original article
Hit count: 456
Hello everyone,
I have a table called pollData. It will always contain only 1 row. It has columns option1, option2, option3, option4, option5 each of type int. In the beginning, these columns have 0 as their value. How do I add 1 to any column, say option2? I mean do i retrieve the value of that column first, perform addition, and store back, or is there any auto increment function?
© Stack Overflow or respective owner