Calling StoredProcedure Using CallableStatement

By | July 17, 2018

In this post we will learn how to call Stored Procedure using JDBC CallableStatement.

Project structure in eclipse:

First of all we are going to create MySQL database schema named jdbcdb

The MySQL jdbcdb database schema consists of the following tables:

  • Customers: stores customer’s data.
  • Employees: This table stores all employees information as well as the organization structure such as who reports to whom.
  • Offices: This table stores sales office data.
  • OrderDetails: stores sales order line items for each sales order
  • Orders: This table stores  sales orders placed by customers.
  • Payments: This table stores payments made by customers based on their accounts.
  • ProductLines:This table stores a list of product line categories.
  • Products: This table stores a list of scale model cars.

We have below db script we will create these tables and insert some records.