海上月明

editer by sun
posts - 162, comments - 51, trackbacks - 0, articles - 8
   :: 首页 :: 新随笔 ::  :: 聚合  :: 管理

Oracle存储过程使用动态SQL[转]

Posted on 2010-12-15 13:20 pts 阅读(280) 评论(0)  编辑  收藏

From:http://database.51cto.com/art/201011/233310.htm

Oracle存储过程 相信大家都比较了解,下面就为您介绍Oracle存储过程使用动态SQL的方法,希望对您能够有所帮助。

Oracle存储过程使用动态SQL 有两种写法:用 DBMS_SQL 或 execute immediate,建议使用后者。试验步骤如下:

1. DDL和DML

<ol class="dp-xml" style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-image: url(http://www.51cto.com/images/art/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; color: #000000; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; border: 0px none initial;"><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">/*** DDL ***/  </span></span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">begin   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    EXECUTE IMMEDIATE 'drop table temp_1';   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    EXECUTE IMMEDIATE 'create table temp_1(name varchar2(8))';   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">end;  </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">/*** DML ***/  </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">declare   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    v_1 varchar2(8);   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    v_2 varchar2(10);   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    str varchar2(50);   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">begin   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">v_1:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=</span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">'测试人员'</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">v_2:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=</span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">'北京'</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    str </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">= </span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">'INSERT INTO test (name ,address) VALUES (:1, :2)'</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    EXECUTE IMMEDIATE str USING v_1, v_2;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    commit;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">end;  </span></li></ol>

2. 返回单条结果

<ol class="dp-xml" style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-image: url(http://www.51cto.com/images/art/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; color: #000000; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; border: 0px none initial;"><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">declare   </span></span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    str varchar2(500);   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    c_1 varchar2(10);   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    r_1 test%rowtype;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">begin   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">c_1:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=</span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">'测试人员'</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">str:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=</span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">'select * from test where name=:c WHERE ROWNUM=1'</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    execute immediate str into r_1 using c_1;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    DBMS_OUTPUT.PUT_LINE(R_1.NAME||R_1.ADDRESS);   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">end ; </span></li></ol>

3. 返回结果集

<ol class="dp-xml" style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 3em !important; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 20px; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-image: url(http://www.51cto.com/images/art/images/010101bg.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; color: #000000; line-height: 30px; background-position: initial initial; background-repeat: no-repeat repeat; border: 0px none initial;"><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">CREATE OR REPLACE package pkg_test as   </span></span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    /* 定义ref cursor类型   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    不加return类型,为弱类型,允许动态sql查询,   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    否则为强类型,无法使用动态sql查询;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    */   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    type myrctype is ref cursor;  </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    --函数申明   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    function get(intID number) return myrctype;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">end pkg_test;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">/  </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">CREATE OR REPLACE package body pkg_test as   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">--函数体   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    function get(intID number) return myrctype is   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        rc myrctype; --定义ref cursor变量   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        sqlstr varchar2(500);   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    begin   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        if </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">intID</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=</span><span class="attribute-value" style="color: blue; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">0</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> then   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            --静态测试,直接用select语句直接返回结果   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            open rc for select id,name,sex,address,postcode,birthday from   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">student;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        else   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            --动态sql赋值,用:w_id来申明该变量从外部获得   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            sqlstr </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">:</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">= 'select id,name,sex,address,postcode,birthday from student   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">where </span><span class="attribute" style="color: red; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">id</span><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">=:w_id';   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            --动态测试,用sqlstr字符串返回结果,用using关键词传递参数   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">            open rc for sqlstr using intid;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        end if;  </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">        return rc;   </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">    end get;  </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;"> </span></li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: #000000; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">end pkg_test;   </span></li><li class="alt" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 14px; list-style-type: decimal; list-style-position: outside !important; list-style-image: initial; color: inherit; line-height: 24px; background-image: url(http://www.51cto.com/images/art/AppData/Roaming/Adobe/Dreamweaver%20CS4/zh_CN/Configuration/images/dt1.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px none initial;"><span style="color: black; background-color: inherit; padding: 0px; margin: 0px; border: 0px none initial;">/  </span></li></ol>


只有注册用户登录后才能发表评论。


网站导航: