执行一条insert语句并传参数*/
create or replace procedure p_test2(i in number) as
begin
insert into t values (i,'x'||to_char(i));
commit;
end;
/
}
create or replace procedure p_test2(i in number) as
begin
insert into t values (i,'x'||to_char(i));
commit;
end;
/
<%@page import="java.sql.*"%>
aaa | bbb |
String procedure = "{call p_test2 (?) }";
CallableStatement cstmt = conn.prepareCall(procedure);
cstmt.setInt(1,33);
cstmt.executeUpdate();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from t");
while(rs.next())
{
out.println("
}
rs.close();
stmt.close();
conn.close();
%>
out.print(conn.isClosed());
%>
转载于:http://blog.itpub.net/10742223/viewspace-219082/