select *,(case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL = 3 then 'Low' end) as PRIORITY from MYTABLE;
但是这是抱怨的
ORA-00923: FROM keyword not found where expected
select t.*,(case when PRI_VAL = 1 then 'High' when PRI_VAL = 2 then 'Med' when PRI_VAL = 3 then 'Low' end) as PRIORITY from MYTABLE t;
这不依赖于任何特定的Oracle版本,不能确定其他数据库.