Q:

Issue : Requirement in our current spring boot Project

Banking Project
We have Spring boot application Banking application, when we login by using customer Id It fetch record and display into the Kyc page that is  after Login we have to display all the record into the web page 
Some thing like this (Sample)
Login

Username -------- PassWord.---------

Then authentication
And get the result using Spring boot jdbc Template 
Some thing like this

First Name--------- Last Name----------

At the time of login it fetch the record it self
But First name,... is one table and Last name,... is from other table that let say we have CUST1  and CUST2 table they have one common column is customerId 
So How to fetch the record and display to the user using spring Boot application We have Procedure but how to call using Jdbc template. Directly display it into the browser.

A:

In this case you may have 2 ways
1. you can use sql joins
let's say CUST1  table have id column and CUST2 have cust1_id coulmn which is the foreign key of CUST1 table. So for this you can use Inner JOIN or Left Outter JOIN.
SELECT c1.*, c2.* FROM CUST1 c1 INNER JOIN CUST2 c2 ON c1.id = c2.cust1_id;

OR

SELECT c1.*, c2.* FROM CUST1 c1 LEFT OUTER JOIN CUST2 c2 ON c1.id = c2.cust1_id;

then you need to use this query into spring jdbc template.
jdbcTemplate.query() method also. in this method you need to pass query and rowmapper.
2. you can write procedure
if you are using procedure then application perform better then 1st step.
if it is a normal procedure then you can directly use below function in spring jdbc template.
jdbcTemplate.update("call PROCEDURE_NAME (?, ?)", param1, param2);

