oracle decode 的自我见解

select decode(1,2,3,11,4,15,11,14,19,17)  tt from dual;

if 1=2 then
  3
elsif 1=11 then
  4
elsif 1=15 then
  11
elsif 1=14 then
  19
 elsif 1=17 then
 17
 endif;
 
select decode(1,2,3,11,4,15,11,14,19,1,2,4)  tt from dual;
 
 if 1=2 then
  3
elsif 1=11 then
  4
elsif 1=15 then
  11
elsif 1=14 then
  19
 elsif 1=1 then
 2
 endif;
 

猜你喜欢

转载自javaeedevelop.iteye.com/blog/1700492