定义了一个存储过程;
create or replace procedure FindBaseInfo(
v_id in out number,
v_name out varchar2,
v_title out varchar2
)
is
temp integer(2);
begin
select count(*) into temp from employee where id=v_id;
if temp>0 then
select id,name,title into v_id,v_name,v_title from employee where id=v_id;
dbms_output.put_line('succeed!');
else
v_id:=0;
dbms_output.put_line('failed!');
end if;
create or replace procedure FindBaseInfo(
v_id in out number,
v_name out varchar2,
v_title out varchar2
)
is
temp integer(2);
begin
select count(*) into temp from employee where id=v_id;
if temp>0 then
select id,name,title into v_id,v_name,v_title from employee where id=v_id;
dbms_output.put_line('succeed!');
else
v_id:=0;
dbms_output.put_line('failed!');
end if;
end;
调用过程如下: