Connection conn = JDBCUtils.getConnection();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getProcedureColumns(null, "DATAPUMP", "GET_INCOME_STATEMENT", "%");
while (rs.next()) {
String dbColumnName = rs.getString("COLUMN_NAME");
short dbColumnReturn = rs.getShort("COLUMN_TYPE");
switch (dbColumnReturn) {
case DatabaseMetaData.procedureColumnReturn:
System.out.println(dbColumnName+ " return");
break;
case DatabaseMetaData.procedureColumnIn:
System.out.println(dbColumnName+ " in");
break;
case DatabaseMetaData.procedureColumnOut:
System.out.println(dbColumnName+ " out");
break;
case DatabaseMetaData.procedureColumnInOut:
System.out.println(dbColumnName+ " inout");
break;
}
}
----------------------------------------------------------------------------------------------------------------------------
其中
Parameters to getProcedureColumns
The JDBC API defines the following parameters for this method call:
没有评论:
发表评论