oracle PL/SQL里给字段起别名

  select   case TianQi
when 1 then '晴天'
when 2 then '阴天'
when 3 then '小雨'

end as "别名"
from tb

--上句中的给字段起别名,能够是end 别名,能够是end as 别名,也能够是as "别名",使用MSSQLSERVER的用户可要当心了,不支持单引号哦,因此不要写成 end as '别名'
 
相关文章
相关标签/搜索