--创建数据表
USE boris
IF OBJECT_ID('Student') IS NOT NULL
DROP TABLE Student
CREATE TABLE Student
(Sname nvarchar(50) null, Ssex nvarchar(50) null,Sage int null)
insert into Student
select '张三','男','14' union all
select '李四','女','15'union all
select '王五','男','16'
--select * from Student
--更改数据
update Student
set Ssex=(case Ssex
when '男' then '男生'
when '女' then '女生'
else '未知性别'
end)
SQL Update 批次更改同列属性值
最新推荐文章于 2023-05-11 10:15:42 发布