<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 167,  comments - 30,  trackbacks - 0
    創建過程的語法:     

    create [or replace] procedure procedure_name
      
    [(argument[{in|out|in out}] type,
        
       argument
    [{in|out|in out}] type)] {is|as}
      procedure_body
      
      

    簡單的例子:



      
    create procedure RaiseError(
       
    /*if p_Raise is true,then an unhandled error is raised.
       if p_Raise is false,the procedure completes successfully.
    */
          p_Raise 
    in boolean:=true,
          p_ParameterA  out 
    numberas
          
      
    begin 
          p_Parameter1:
    ='abcdwxc';
          p_Parameter2:
    =143;
      
    end ParameterLength;

     

    刪除過程語法:

    drop procedure procedure_name;

     

    2、創建函數的語法:

    Code

     

    簡單函數的例子:

     create function ClassInfo(
          p_Department classes.department
    %type,
          p_Course     classes.course
    %type)
          
    return varchar is 
          v_CurrentStudents 
    number;
          v_MaxStudents     
    number;
          v_PercentFull     
    number;
          
    begin
              
    select current_students,max_students 
              
    into v_CurrentStudents,v_MaxStudents
              
    from classes
              
    where department=P_Department and course=P_Course;
              
              
    --計算百分比
              v_PercentFull:=v_CurrentStudents/V_MaxStudent*100;
              
              
    if v_PercentFull=100 then
              
    return 'Full';
              elseif v_PercentFull
    >80 then 
              
    return 'Some Room';
              elseif v_PercentFull
    >60 then 
              
    return 'More Room';
              elseif v_PercentFull
    >0 then 
              
    return 'Lots of Room';
              
    else
              
    return 'Empty';
              
    end if 
              
          
    end ClassInfo;
              

     

    刪除函數語法:

    drop function function_name;
    posted on 2009-01-31 12:18 David1228 閱讀(500) 評論(0)  編輯  收藏 所屬分類: 數據庫

    <2009年1月>
    28293031123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    Java

    Linux知識相關

    Spring相關

    云計算/Linux/虛擬化技術/

    友情博客

    多線程并發編程

    開源技術

    持久層技術相關

    搜索

    •  

    積分與排名

    • 積分 - 359714
    • 排名 - 154

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲中文字幕无码亚洲成A人片| 久久亚洲国产精品一区二区| 亚洲av成人综合网| 中文字幕久精品免费视频| 亚洲中文字幕久久精品无码喷水 | 亚洲综合最新无码专区| 黄网站色成年片大免费高清| 日本高清免费中文字幕不卡| MM1313亚洲精品无码久久| 日本一区免费电影| 水蜜桃视频在线观看免费| 亚洲日本一区二区一本一道| xxxxxx日本处大片免费看| 亚洲精品无码不卡在线播放HE| a毛片在线看片免费| 婷婷亚洲综合五月天小说| 最近2019中文字幕免费直播| 亚洲av永久无码嘿嘿嘿| 成人毛片18女人毛片免费96| 美女黄色毛片免费看| 亚洲综合激情另类专区| 一级毛片在线观看免费| 亚洲成a人片在线观看精品| 成人五级毛片免费播放| 日本一区二区三区在线视频观看免费 | 黄桃AV无码免费一区二区三区| 亚洲精品无码午夜福利中文字幕 | 最近新韩国日本免费观看| 亚洲jjzzjjzz在线播放| 国产zzjjzzjj视频全免费| 日本一区午夜艳熟免费| 亚洲成av人片在线看片| 又黄又爽无遮挡免费视频| 免费污视频在线观看| 亚洲码欧美码一区二区三区| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 亚洲AV色香蕉一区二区| 免费无码又黄又爽又刺激| 人成电影网在线观看免费| 亚洲午夜精品在线| 亚洲女人被黑人巨大进入|