函数是这样的:
create or replace function fun_InsertPerson
(
p_id out number,
p_user_name varchar2,
p_password varchar2,
p_real_name varchar2,
p_birthday date
)
return varchar2
is
returnVal varchar2(50);
begin
select seq_personid.nextval into p_id from dual;
insert into person(id,user_name,password,real_name,birthday)
values(p_id,p_user_name,p_password,p_real_name,p_birthday);
returnVal := p_user_name;
return (returnVal);
end;
在pl sql中这样调用
declare
p_id number;
p_user_name varchar2(50);
begin
p_user_name := fun_InsertPerson(p_id,'test','111111','test',sysdate);
dbms_output.put_line(p_id);
dbms_output.put_line(p_user_name);
end;
我现在要用iBatis调用,map文件怎么写呢
注意不是过程,而是函数,这是以前的人写了很多的函数,iBatis可以直接调用吗
iBatis调用过程我知道这样写的:
<procedure 调用函数怎么写呢