Search code snippets, questions, articles...

Increase or decrease column value counter in Mysql

UPDATE table_name 
SET 
column_name = column_name + 1 
WHERE id = 10
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

The MySql query can be used to increase or decrease a column counter value. As in the code snippet, we have increased cloumn_name value by 1. You can put any value in place of 1.

Was this helpful?
0 Comments