乙個示例儲存過程

2021-03-31 14:16:15 字數 664 閱讀 4692

create or replace procedure bm_add

(  p_id varchar,

p_name varchar)is

--v_count number;

begin

/*--檢查輸入引數是否為空

if p_id is null or p_name is null then

p_out:='輸入的值為空!';

return;

end if;

--該使用者名稱已經存在

select count(*) into v_count from bm a where upper(id)=upper(p_id);

if v_count>0 then

p_out:='該使用者名稱已經存在';

return ;

end if;

*/insert into bm  (id,name) values (p_id,p_name);

--***mit;

--p_out:=null;

--return ;

/*--插入過程中出現異常

exception

when others then

p_out:='插入過程中出現異常!';

return ;

*/end;

乙個儲存過程

create or replace package abc zys is procedure daily census end abc zys 建乙個包,包中有儲存過程daily census。不涉及任何引數。create or replace package body abc zys is pro...

乙個儲存過程

首先是建立儲存過程.drop procedure if exists externalcalltocomplete delimiter create procedure externalcalltocomplete begin drop table if exists temp1 create ta...

乙個分頁儲存過程

page language c import namespace system.data import namespace system.data.sqlclient 訂單號 服務專案 預訂日期 操作人員 分配狀態 databinder.eval container.dataitem,offerid...