I am executing a stored procedure in Java using the old school way:
CallableStatement cs =
con.prepareCall("schema.procedure("?,?,?,?");
cs.setString(1, "f");
cs.setString(2, "f");
cs.registerOutParameter(3, Types.CHAR);
cs.registerOutParameter(4, Types.CHAR);
cs.execute();
System.out.println(cs.getString(3));
I can retrieve the output columns, but the procedure also returns other results as part of cursor, which i can retrieve using :
ResultSet rs= cs.executeQuery()
while (rs.next()) {
for(int i=1;i<=rs.getMetaData().getColumnCount();i++){
rs.getString(i)
My question is, can i retrieve both output and the cursor in the same statement ? Thanks,