How to Call Stored Procedures in Relational Databases


show more Calling stored procedures provides you with in-depth training on Developer. Taught by David Gassner as part of the Java Database Integration with JDBC show less
please wait ...

Calling stored procedures

In previous videos of this series I have described how to work with static SQL statements using the Statement interface and with parameterized statements using PreparedStatement. There is a third interface that's available in JDBC called CallableStatement which can be used with stored procedures and functions that are defined at the database level. Let's begin by talking about the nature of a stored procedure. In this project, StoredProcs, I have a main class that's using PreparedStatement and a parameterized SQL statement as a String, and I'm filling in the parameter at runtime.

I am going to take this parameterized SQL and move it to the database level as a stored procedure and then show you how to call that stored procedure from your JDBC application. I'll start by minimizing Eclipse and my browser, and I'll get to this file MySQL StoredProcs.txt. The syntax for defining stored procedures can vary widely from one database to another, so I'm going to focus on just on...

Calling stored procedures
Video duration: 5m 48s 2h 51m Intermediate

Viewers:

Calling stored procedures provides you with in-depth training on Developer. Taught by David Gassner as part of the Java Database Integration with JDBC

Subject:
Developer
Software:
Java
Author:
please wait ...