一、
CallableStatement cstmt = con
.prepareCall("{?=call detector_plsql_fn(?,?)}");
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.setString(2, "I");
cstmt.registerOutParameter(3, Types.VARCHAR);
cstmt.execute();
String strValue = cstmt.getString(1);
String v_out = cstmt.getString(3);
System.out.println("The return value is:" + strValue + " and v_out is:" + v_out);
cstmt.close();
其中函数
detector_plsql_fn
...
本文介绍了一个使用CallableStatement来调用PL/SQL函数的例子,展示了如何设置输入参数及获取输出结果。
1695

被折叠的 条评论
为什么被折叠?



