oracle 返回結果集的儲存過程

2021-05-08 06:14:53 字數 939 閱讀 8652

/*  oracle 返回結果集的儲存過程

1、先建立乙個包

create or replace testpaceage as

type test_cursor is ref cursor;

end testpaceage;

2、建立儲存過程,獲取結果集

create or replace procedure sp_pro9

(spno in number,p_cursor out testpaceage.test_cursor)

isbegin

open p_cursor for select * from emp where deptno=spno;

end

*///c#**

oracledataadapter sdr = new oracledataadapter();

oraclecommand cmd = new oraclecommand();

oracleparameter parameters =;

parameters[0].value =30;

parameters[1].direction = parameterdirection.output;

cmd.connection = conn;

cmd.commandtext ="sp_pro9";

cmd.commandtype = commandtype.storedprocedure;

foreach (oracleparameter parameter in parameters)

sdr.selectcommand = cmd;

dataset ds = new dataset();

sdr.fill(ds);

gridview1.datasource = ds;

gridview1.databind();

Oracle 儲存過程返回結果集

oracle 儲存過程返回結果集 1.返回陣列 在oracle後台建立乙個程式包或者儲存過程 connect scott tiger create or replace package ado callpkg as type eid is table of number 4 index by bin...

oracle 儲存過程返回結果集

好久沒上來了,難道今天工作時間稍有空閒,研究了一下oracle儲存過程返回結果集.配合oracle臨時表,使用儲存過程來返回結果集的資料讀取方式可以解決海量資料表與其他表的連線問題.在儲存過程中先根據過濾條件從海量資料表中選出符合條件的記錄並存放到臨時中,可以通過乙個檢視將臨時表與其他相關表連線起來...

oracle 儲存過程 返回結果集

oracle儲存過程如何返回結果集 最簡單的方式 返回oracle的系統游標 create or replace procedure card count yljg v start date in varchar2,開始時間 v end date in varchar2,結束時間 v parento...