--带出参的存储过程的创建和调用
create or replace procedure pro_owners_add1
(
v_name varchar2,--名称
v_addressid number,--地址编号
v_housenumber varchar2,--门牌号
v_watermeter varchar2,--水表号
v_ownertypeid number,--业主类型
v_id out number
)
is
begin
select seq_owners.nextval into v_id from dual;
insert into t_owners
values(v_id,v_name,v_addressid,v_housenumber,v_watermeter,sysdate,v_ownertypeid);
commit;
end;
--调用传出参数的存储过程
declare
v_id number;
begin
pro_owners_add1('李四',2,'32-98','',1,v_id);
dbms_output.put_line(v_id);
end;