修改user_id为6的数据user_age为14
Update user set user_age=14 where user_id=6
修改user_id为1的数据user_name为ann,user_age为11
Update user set user_name='ann',user_age=11 where user_id=1
注:在update重要数据,并且是高并发时应注意判断原值是否已经改变过。
Update user set user_name='ann',user_age=11 where user_id=1 and user_age==12
希望能对大家有所帮助。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有