This example will show you how to use java.sql.CallableStatement to get output data from a stored procedure. This example will use Microsoft SQL Server, the java code for other databases is the same. If you do not know how to create stored procedures in Microsoft SQL Server, you can read the article JDBC CallableStatement Stored …
This example will show you how to use java.sql.CallableStatement to call a Microsoft SQL Server stored procedure with input parameters. If you use other databases such as Oracle, MySQL, etc, the java code is almost the same.
java.sql.PreparedStatement class is more powerful and efficient than java.sql.Statement, This example will show you how to execute PreparedStatement in batch.
If you need to switch between different databases using JDBC, you can store different database JDBC connection-related information in a properties file. And then you can load the JDBC properties data in java source code to use them. This example will show you how to do it, and how you can utilize its benefits.
This article will show you how to use java.sql.Statement to execute insert, update, delete and select SQL DML commands with examples.
This article will show you examples of how to use JDBC to connect to a MySQL database server.
This article will show you how to install, use the PostgreSQL database server and how to use JDBC to connect to it.
This article will show you examples of how to connect Oracle DB use the JDBC driver.