版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/choath/article/details/80573985
格式:update 表名称 set 字段名称 = 字段名称 + 1 [ where语句]
update student set age =age+1 where sex="女";
更新所有女生的年龄+1
注意:一般情况用于计数,比如会员卡使用次数,每使用一次,使用次数+1
格式:update 表名称 set 字段名称 = 字段名称 + 1 [ where语句]
update student set age =age+1 where sex="女";
更新所有女生的年龄+1
注意:一般情况用于计数,比如会员卡使用次数,每使用一次,使用次数+1