![]() |
The Java Developers Almanac 1.4 |
|
e280. Getting the Stored Procedure Names in a DatabaseThis example retrieves the names of all stored procedures in a database. try {
// Get database metadata
DatabaseMetaData dbmd = connection.getMetaData();
// Get all stored procedures in any schema and catalog
ResultSet resultSet = dbmd.getProcedures(null, null, "%");
// Get stored procedure names from the result set
while (resultSet.next()) {
String procName = resultSet.getString(3);
}
} catch (SQLException e) {
}
e282. Calling a Function in a Database e283. Creating a Stored Procedure or Function in an Oracle Database © 2002 Addison-Wesley. |