using system;
using system.collections.generic;
using system.text;
using system.data.oracleclient;
using system.data;
namespace oracleopdemo
private
static
void executeparesql()
catch (oracleexception ex)
finally}}
private
static
void executeproc()
catch (oracleexception ex)
finally}}
}}oracle procedure:
create or replace procedure ptest(
p_checkid in varchar2,p_item in number,
p_value in number,p_delayday in number,p_description in varchar2
) is
v_state iqc_check.verify_state%type;
begin
declare cursor mycursor1 is
select a.verify_state from check a where a.id = p_checkid;
begin
open mycursor1;
fetch mycursor1 into v_state;
if v_state=0 then
insert into check_pack(checkid,item,value,delayday,description)
values(p_checkid,p_item,p_value,p_delayday,p_description);
else
update check_pack
set value=p_value,
delayday=p_delayday,
description=p_description
where checkid=p_checkid and item =p_item;
end if;
close mycursor1;
end ;
--commit;
end ptest;
向Oracle中傳入陣列,批量執行SQL語句
1 首先用pl sql建立package 1 create orreplace package excutebatchoperate2as 3 type sqlstr array is table ofvarchar2 1000 index bybinary integer 4procedure e...
向Oracle中傳入陣列,批量執行SQL語句
1 首先用pl sql建立package 1 create orreplace package excutebatchoperate2as 3 type sqlstr array is table ofvarchar2 1000 index bybinary integer 4procedure e...
mysql執行語句 mysql執行sql語句過程
流程概述 mysql得到sql語句後,大概流程如下 1.sql的解析器 負責解析和 sql 2.預處理器 對解析後的sql樹進行驗證 3.查詢優化器 得到乙個執行計畫 4.查詢執行引擎 得到資料結果集 5.將資料放回給呼叫端。流程圖如下所示 分發器及快取階段 首先,如果系統的快取功能開啟著的話,sq...