假定存儲過程名字為 sp_yourprocedurename,有兩個參數
CallableStatement cstmt = con.prepareCall("{call sp_yourprocedurename(?,?}");
cstmt.registerOutparameter(2,Java.sql.Types.FLOAT);
cstmt.setint(1,parameter1);
cstmt.execute();
out.println("Procedure output is :"+cstmt.getFloat(2));