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

代码
        CallableStatement statement = getSession().connection().prepareCall(
                
"{call sp_get_keyword_code(?, ? ,? ,?, ?)}");
        statement.setString(
1, parentCode);
        statement.setInt(
22);
        statement.setString(
3"W");
        statement.setInt(
41);
        statement.registerOutParameter(
"out_code", Types.VARCHAR);
        statement.executeUpdate();
        String keycode 
= statement.getString("out_code");
原文地址:https://www.cnblogs.com/yvesliao/p/1773411.html