java怎么调用数据库函数
callStmt = con.prepareCall("{call testAA(?,?)}");
callStmt.setString(1,"000000000026");
callStmt.setString(2,"添加添加添加");
if (callStmt.executeUpdate()==0){
System.out.println("============success================");
}else{
System.out.println("============failure================");
}
函数:
function testAA(id in varchar2,na in varchar2)RETURN VARCHAR2
is
begin
insert into table(id, name ) values(id,na);
commit;
end testAA;