MySQL Update Column +1?

Viewed 125959

I was wondering what would be the easiest way to update a column by +1? I will be updating a post count of a category based on when users submits a new post.

Thanks.

7 Answers
update TABLENAME
set COLUMNNAME = COLUMNNAME + 1
where id = 'YOURID'
update table_name set field1 = field1 + 1;

How to update order column Count value

Try

  UPDATE order SET                                      
    Order_Count = Order_Count + 100
  WHERE 
    Order_ID = '1234'
Related