How Do You Get Stored Procedure Names? JDBC

A stored procedure is a group of SQL statements that form a logical unit and perform a particular task. Stored procedures are used to encapsulate a set of operations or queries to execute on a database server. For example, operations on an employee database (hire, fire, promote, lookup) could be coded as stored procedures executed by application code. Stored procedures can be compiled and executed with different parameters and results, and they may have any combination of input, output, and input/output parameters. Stored procedures are supported by most DBMSs, but there is a fair amount of variation in their syntax and capabilities.

In order to execute a stored procedure, you need to know its name and its associated signature— the number of parameters, the type of each parameter, the mode of each parameter (IN, OUT, IN/OUT), and the result type.

Oracle Database Setup

Function created.

MySQL Database Setup

Query OK, 0 rows affected (0.01 sec)

The Solution

Invoking GetStoredProcedures for MySQL

Figure :shows how to run the solution for the MySQL database.

Invoking GetStoredProcedures for MySQL

Invoking GetStoredProcedures for Oracle

Figure :shows how to run the solution for the Oracle database.

Invoking GetStoredProcedures for Oracle

Invoking GetStoredProcedures for Unknown Vendor

Figure :shows how to run the solution for an unknown database vendor.

Invoking GetStoredProcedures for Unknown Vendor

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

JDBC Topics