select
case name
when 'aa' then 'hello aa'
when 'bb' then 'hello bb'
else name
end as name,
cast(name as varchar(50)) as '姓名',
convert(varchar(50),name) as '名字'
from students
但是注意要想在sql中将字符串转换成时间,要将字符串的格式改变成时间格式
select
case name
when 'aa' then 'hello aa'
when 'bb' then 'hello bb'
else name
end as name,
cast(name as varchar(50)) as '姓名',
convert(varchar(50),name) as '名字'
from students
但是注意要想在sql中将字符串转换成时间,要将字符串的格式改变成时间格式