<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
    創(chuàng)建過程的語法:     

    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、創(chuàng)建函數(shù)的語法:

    Code

     

    簡單函數(shù)的例子:

     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;
              

     

    刪除函數(shù)語法:

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

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

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    Java

    Linux知識相關(guān)

    Spring相關(guān)

    云計算/Linux/虛擬化技術(shù)/

    友情博客

    多線程并發(fā)編程

    開源技術(shù)

    持久層技術(shù)相關(guān)

    搜索

    •  

    積分與排名

    • 積分 - 358547
    • 排名 - 154

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 全免费a级毛片免费看| 久久成人永久免费播放| 国产AV无码专区亚洲AV麻豆丫| 看Aⅴ免费毛片手机播放| 久久99久久成人免费播放| 伊人久久免费视频| 成年大片免费视频| 五月婷婷亚洲综合| 国产v亚洲v天堂无码网站| 亚洲乱码卡一卡二卡三| 国产成人亚洲综合a∨| 国偷自产一区二区免费视频| 日韩中文字幕精品免费一区| 免费中文字幕在线| 亚洲国产成人久久综合碰碰动漫3d | 337p日本欧洲亚洲大胆裸体艺术| 久久久久亚洲精品成人网小说| 亚洲最大成人网色香蕉| 羞羞漫画登录页面免费 | 伊人久久国产免费观看视频| 午夜免费啪视频在线观看 | 亚洲视频国产精品| 狼人大香伊蕉国产WWW亚洲| 免费毛片在线看不用播放器| 亚洲精品动漫免费二区| 亚洲日韩在线中文字幕第一页| 亚洲天堂中文字幕| 西西人体大胆免费视频| 99精品热线在线观看免费视频| 精品国产免费观看久久久| 伊人久久大香线蕉亚洲| 久久亚洲精品国产精品婷婷| 国产高潮久久免费观看| AA免费观看的1000部电影| 精品亚洲成α人无码成α在线观看| 亚洲无砖砖区免费| 一级毛片视频免费观看 | 久久久久久AV无码免费网站下载 | 美女被免费喷白浆视频| 在线亚洲精品福利网址导航| 亚洲日本国产综合高清|