比如下面写的是Oracle的一个存储过程:create or replace procedure queryempinfo(eno in number,pename out varchar2,psal out number,pjob out varchar2)asbegin--得到该员工的姓名 月薪和职位select ename, sal, job into pename, psal, pjob from emp where empno = eno;end;Java调用Oracle的存储过程try {Class.forName(driverName);conn = DriverManager.getConnection(url, username, password);stat = conn.prepareCall(sql);// 一个输入参数和三个输出参数stat.setInt(1, 7566);stat.registerOutParameter(2, OracleTypes.VARCHAR);stat.registerOutParameter(3, OracleTypes.NUMBER);stat.registerOutParameter(4, OracleTypes.VARCHAR);stat.execute();String name = stat.getString(2);int sal = stat.getInt(3);String job = stat.getString(4);System.out.println("name: " + name + ", sal: " + sal + ", job: " + job);} catch (Exception e) {e.printStackTrace();} finally {close(conn, stat, rs);}