如何在oracle sql中创建记录别名
我有一张有两列滚动和出席的临时表如何在oracle sql中创建记录别名,sql,string,oracle,select,aliases,Sql,String,Oracle,Select,Aliases,我有一张有两列滚动和出席的临时表 roll attendance -------------- 1 A 2 P 3 NA 我想将此表打印为 roll attendance -------------- 1 Absent 2 Present 3 Not applicable 您可以使用大小写表达式: select roll, case attendance when 'A' then
roll attendance
--------------
1 A
2 P
3 NA
我想将此表打印为
roll attendance
--------------
1 Absent
2 Present
3 Not applicable
您可以使用
大小写
表达式:
select roll,
case attendance
when 'A' then 'Absent'
when 'P' then 'Present'
when 'NA' then 'Not applicable'
end as attendance
from mytable