sql

Increase or decrease column value counter in Mysql

UPDATE table_name 
SET 
column_name = column_name + 1 
WHERE id = 10

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?