Oracle中 IF-ELSIF-ELSE 使用


竟然有人问我Oracle的if-else。。

 1 if ... then 
 2 ...   
 3 elsif ... then 
 4 ...   
 5 
 6 else 
 7 ...   
 8 end if;   
 9     
10 
11 or     
12 if ... then     
13   ...   
14 else 
15 ...   
16 end if;   
17     
18 or     
19 if ... then 
20 ...   
21 end if;
22 
23 注:if后的条件不加括号
24 
25 例子:
26            if  val <> 0   then
27                val := 1;
28            end if;

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM