我是 jdbc 的新手,我的程序总是返回 0.0...帮助
CallableStatement cs= con.prepareCall("{ call getbalance(?,?) }");
cs.setInt(1, 1234);
//cs.setString(2, "dfdf");
cs.registerOutParameter(2, Types.DOUBLE,23);
cs.execute();
System.out.println("Balance is "+ cs.getDouble(2));
CREATE PROCEDURE `getbalance`( acno int, out amt int)
begin
select bal * amt from bank WHERE accno=acno;
end;