SQL> create table temp(col1 number);表已创建。SQL> l 1 insert into temp 2 select 1 from dual 3 union select 2 from dual 4 union select 3 from dual 5* SQL> /已创建3行。SQL> select case col1 when 1 then '1111' when 2 then '2222' when 3 then '3333' end from temp;CASE ---- 1111 2222 3333 SQL>
1 insert into temp
2 select 1 from dual
3 union select 2 from dual
4 union select 3 from dual
5*
SQL> /已创建3行。SQL> select case col1 when 1 then '1111' when 2 then '2222' when 3 then '3333' end from temp;CASE
----
1111
2222
3333
SQL>