代码如下:
java.sql.CallableStatement call = conn.prepareCall("{ call testProcedure(?) } ");
call.registerOutParameter(1,java.sql.Types.VARCHAR);
call.executeUpdate();
System.out.println( call.getString(1) )
java.sql.CallableStatement call = conn.prepareCall("{ call testProcedure(?) } ");
call.registerOutParameter(1,java.sql.Types.VARCHAR);
call.executeUpdate();
System.out.println( call.getString(1) )
但是如何能得到
return 'test2'
返回的'test2'呢?
call.registerOutParameter(1,java.sql.Types.VARCHAR);
call.registerOutParameter(2,java.sql.Types.VARCHAR);
call.execute();
String strTest2 = call.getString(1);
String strTest1 = call.getString(2);