
Statement interface:
The Statement interface offers systems to execute request with the database. The declaration interface is a creation lines of ResultSet ,it gives preparing plant procedure to get the subject of ResultSet.
Methods:
Prepared Statement:
The PreparedStatement interface is a sub interface of Statement. It is utilized to execute parameterized inquiry.
We should see the case of parameteriSed inquiry:
String sql="insert into emp values(?,?,?)";
As should be obvious, we are passing parameter (?) for the qualities. Its esteem will be set by calling the setter techniques for PreparedStatement. The execution of the application will be speedier on the off chance that you utilize PreparedStatement interface since question is accumulated just once.
JAVA Tutorial Video
[embed]https://www.youtube.com/watch?v=UbpbqqIw_3Q&t=1270s[/embed]Instance of PreparedStatement:
public PreparedStatement prepareStatement(String query)throws SQLException{}Methods of prepared Statement:
Callable Statement:
CallableStatement interface is utilized to call the put away techniques and capacities. We can have business rationale on the database by the utilization of put away methodology and capacities that will improve the execution in light of the fact that these are recompiled.
Assume you require the get the age of the representative in view of the date of birth ,you may make a capacity that gets date as the info and returns age of the worker as the yield.
Instance of CallableStatement:
public CallableStatement prepareCall("{ call procedurename(?,?...?)}");
example the instance of CallableStatement :
CallableStatement stmt=con.prepareCall("{call myprocedure(?,?)}");
Data access :

The protest of ResultSet keeps up a cursor indicating a line of a table. At first, cursor focuses to before the principal push.Be that as it may, we can make this question push ahead and reverse way by passing either TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE in create Statement(int,int) technique and in addition we can make this protest as update.