ITeye博客

oracle decode 的自我见解

javaEEdevelop · 2012-10-17 17:50 · 数据库 · Markdown

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;

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。