Hibernate调用带返回值的存储过程的方法

CallableStatement statement = getSession().connection().prepareCall( "{call sp_get_keyword_code(?, ? ,? ,?, ?)}"); statement.setString(1, parentCode); statement.setInt(2, 2); statement.setString(3, "W"); statement.setInt(4, 1); statement.registerOutParameter("out_code", Types.VARCHAR); statement.executeUpdate(); String keycode = statement.getString("out_code");

你可能感兴趣的:(Hibernate,String,存储)