MySQL 如何更新某个字段的值为原来的值加1

时间:2021-12-24 12:50:10
格式:update 表名称 set 字段名称 = 字段名称 + 1 [ where语句]
比如说数据库中有一张student表,要想把id为1的学生成绩(score)加1则
update student set score=score+1 where id = 1