SQLServer2019-修改
语法
update 表名 set 字段1=值1,字段2=值2 where条件
- 工资普调,每个人加薪1000元
update People set PeopleSalary = PeopleSalary+1000
- 工资单调,给员工编号为1的人加薪2000元
update People set PeopleSalary = PeopleSalary+2000
where PeopleId = 1
- 将企业部门(部门编号3)人员工资低于60000的调整成60000
update People set PeopleSalary = 90000
where DepartmentId=3 and PeopleSalary<90000
- 修改贺峻霖的工资是以前的一半,并且把贺峻霖的地址修改成成都
update People set PeopleSalary = PeopleSalary*0.5,PeopleAddress = '成都'
where RankId = 7