November 2015
Beginner
464 pages
9h 46m
English
For calling stored procedures, JDBC provides the CallableStatement interface, which extends PreparedStatement. The API defines two escape syntaxes, which can be used to call a function on the database:
{? = call <procedure-name>[(?, ?, …)]}{call <procedure-name>[(?, ?, …)]}The first form includes a return parameter, while the second one does not. The list of parameters passed to the function can contain both input and output parameters. If a function does not expect any parameters, it can be left out completely.
Examples of function handling are as follows:
{? = call random}: A call to a function without parameters{call setval(?, ?)}: A call without a return parameter{? = call substring(?, ?, ?)}: A call with the return parameter ...Read now
Unlock full access