如下
SELECT LogID
UserID
LogTime
Url
Description
(case OperateType when OperateType =
then
新增
when OperateType=
then
修改
else
刪除
end case) FROM LOG ????
case SELECT LogID
UserID
LogTime
Url
Description
(
case
when OperateType =
then
新增
when OperateType=
then
修改
else
刪除
end ) FROM LOG
DECODE的寫法: SELECT LogID
UserID
LogTime
Url
Description
decode(OperateType
新增
修改
刪除
) OperationName
FROM LOG
建議用DECODE的寫法
From:http://tw.wingwit.com/Article/program/Oracle/201311/17181.html