How to update field to add value to existing value?

前端 未结 7 1946
迷失自我
迷失自我 2021-01-03 18:11

How to update field to add value to existing value?
For example I have

Table name: table

id   credit
1      4
2      5
3      3


        
相关标签:
7条回答
  • 2021-01-03 19:13

    Try this code

    UPDATE table SET credit = credit + 7 WHERE id='1' 
    
    0 讨论(0)
提交回复
热议问题