av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

Oracle條件分支語句示例

Oracle條件分支語句是我們經(jīng)常需要用到的,下面就為您詳細介紹Oracle條件分支語句的語法,如果您對此方面感興趣的話,不妨一看。

在金城江等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計、做網(wǎng)站 網(wǎng)站設(shè)計制作按需網(wǎng)站策劃,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),高端網(wǎng)站設(shè)計,網(wǎng)絡(luò)營銷推廣,成都外貿(mào)網(wǎng)站建設(shè)公司,金城江網(wǎng)站建設(shè)費用合理。

Oracle條件分支語句用于依據(jù)特定的情況選擇要執(zhí)行的操作,PL/SQL提供了三種Oracle條件分支語句:if-then, if-then-else,if-then-elsif。

語法如下:

 
 
 
  1. if conditions then  
  2. statements;  
  3. [elseif conditions then   
  4. statements;]  
  5. [else   
  6. statements;]  
  7. end if;   

1、if-then示例

用于執(zhí)行單一條件判斷,如果滿足特定條件則會執(zhí)行相應(yīng)操作,如果不滿足特定條件則退出條件分支語句。

 
 
 
  1. declare  
  2. v_count number;  
  3. begin  
  4. select count(*) into v_count from cip_temps;  
  5. if(v_count>0) then  
  6. dbms_output.put_line('v_cont的值:'|| v_count);  
  7. end if;  
  8. end;  

2、if-then-else示例
用于執(zhí)行二重條件判斷,如果滿足特定條件則執(zhí)行一組操作,如果不滿足則執(zhí)行另一組操作。

 
 
 
  1. declare  
  2. v_count number;  
  3. begin  
  4. select count(*) into v_count from cip_temps;  
  5. if(v_count>11) then  
  6. dbms_output.put_line('v_cont的值:'|| v_count);  
  7. else   
  8. dbms_output.put_line('v_count的值:'|| v_count);  
  9. end if;  
  10. end;  

3、if-then-elsif示例
用于執(zhí)行多重條件判斷,如果滿足特定條件1則執(zhí)行***組操作,如果滿足特定條件2則執(zhí)行第二組操作,以此類推,如果都不滿足特定條件則執(zhí)行不滿足條件的操作。

 
 
 
  1. declare  
  2. v_count number;  
  3. begin  
  4. select count(*) into v_count from cip_temps;  
  5. if(v_count>10) then  
  6. dbms_output.put_line('if操作___v_cont的值:'|| v_count);  
  7. elsif (v_count=10) then  
  8. dbms_output.put_line('elsif操作____v_count的值:'|| v_count);  
  9. else  
  10. dbms_output.put_line('else操作____v_cout的值:'||v_count);  
  11. end if;  
  12. end;  
  13. /   

【編輯推薦】

詳解oracle授權(quán)語句

Oracle循環(huán)語句的寫法

Oracle創(chuàng)建用戶的語法介紹

Oracle默認用戶的密碼問題

Oracle游標(biāo)常用屬性


分享文章:Oracle條件分支語句示例
網(wǎng)頁網(wǎng)址:http://uogjgqi.cn/article/coogigp.html
掃二維碼與項目經(jīng)理溝通

我們在微信上24小時期待你的聲音

解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流