免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

oracleif語句怎么使用

這篇文章主要介紹“oracle if語句怎么使用”,在日常操作中,相信很多人在oracle if語句怎么使用問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”oracle if語句怎么使用”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!

成都創新互聯公司專業為企業提供東營區網站建設、東營區做網站、東營區網站設計、東營區網站制作等企業網站建設、網頁設計與制作、東營區企業網站模板建站服務,十載東營區做網站經驗,不只是建網站,更提供有價值的思路和整體網絡服務。

create or replace procedure findclass2(num in number) --創建或修改存儲過程,存儲過程名為findclass
as
totalClass number(1); --創建一個數字類型的變量,totalClass
 begin
  if num is not null then
select count(*)  into totalClass from class; --把count計數出來的數量 通過into賦值給totalClass變量


 DBMS_OUTPUT.put_line('num'||num); --數據庫輸出數量;
  DBMS_OUTPUT.put_line('totalClass'||totalClass); --數據庫輸出數量;
         if totalClass >=2 then
         DBMS_OUTPUT.put_line('總班級數'||totalClass); --數據庫輸出數量;
    if totalClass <=1 then
       DBMS_OUTPUT.put_line('是小于'||totalClass); --數據庫輸出數量;
            if num >0 then
             DBMS_OUTPUT.put_line('num是'||num); --數據庫輸出數量;
           else
             DBMS_OUTPUT.put_line('都不執行'||num); --數據庫輸出數量;
         end if;
         end if;
         end if;
 end if;
 
end findclass2; --存儲過程結束

create or replace procedure findclass(num in number) --創建或修改存儲過程,存儲過程名為findclass
as
totalClass number(1); --創建一個數字類型的變量,totalClass
begin --存儲過程開始
  if num is not null then 
select count(*)  into totalClass from class; --把count計數出來的數量 通過into賦值給totalClass變量


                 
       if totalClass >=2 then 
         DBMS_OUTPUT.put_line('總班級數'||totalClass); --數據庫輸出數量;
          
         end if;
         
           if num >5 then 
             DBMS_OUTPUT.put_line('num是'||num); --數據庫輸出數量;
              
             end if;
         
         if num >=0 then 
             DBMS_OUTPUT.put_line('num0是'||num); --數據庫輸出數量;
              
             end if;
         end if;

end findclass; --存儲過程結束

到此,關于“oracle if語句怎么使用”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注創新互聯網站,小編會繼續努力為大家帶來更多實用的文章!

網頁名稱:oracleif語句怎么使用
當前鏈接:http://m.newbst.com/article6/pjdjig.html

成都網站建設公司_創新互聯,為您提供網站建設網站制作外貿網站建設自適應網站網站改版

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

微信小程序開發