1.update a set a.nickname=b.nickname from tab1 a,tab2 b where a.username=b.username
2.Update student_score set
student_score.level=level_about.level from
level_about where student.score
between level_about.start_score and level_about.end_score
本文介绍了两种实用的SQL更新操作技巧:一是通过联表更新的方式修改昵称;二是根据学生分数更新等级,实现数据的有效管理和更新。
1.update a set a.nickname=b.nickname from tab1 a,tab2 b where a.username=b.username
2.Update student_score set
student_score.level=level_about.level from
level_about where student.score
between level_about.start_score and level_about.end_score
5873

被折叠的 条评论
为什么被折叠?