JDBC 4.2 Tutorial with Java 8
This is complete beginners to expert up-to-date JDBC 4.2 Tutorial. In this tutorial, we will learn the latest features added to JDBC 4,4.1 and 4.2 release. All the source code examples in this tutorial are developed using JDK 8 with JDBC 4.2.
JDBC stands for Java Database Connectivity, which is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.
Java JDBC API Overview
Example to insert multiple records in a table using Statement interface.
Example to create a table using Statement interface.
Example to retrieve records from a table using Statement interface.
Example to delete a record from a table using Statement interface.
Example to insert records in a batch process via Statement interface.
Example to update records in a batch process via Statement interface.
Example to insert a record in a table using PreparedStatement interface.
Example to update a record in a table using PreparedStatement interface.
Example to retrieve records from a table using PreparedStatement interface.
Example to pass a list of values to IN clause using PreparedStatement interface.
Example to insert records in a batch process via PreparedStatement interface.
Example to update records in a batch process via PreparedStatement interface.
Create and use Stored Procedure examples using CallableStatement interface.
How to use JDBC transactions with examples.
In this article, we will learn commonly used methods of PreparedStatement interface.
In this article, we will learn commonly used methods of CallableStatement interface.
In this article, we will learn commonly used methods of ResultSet interface with examples.
In this article, we will learn commonly used methods of ResultSetMetaData interface.
In this article, we will learn commonly used methods of DatabaseMetadata interface.
In this article, we will learn commonly used methods of DriverManager class with examples.
Example to update records in a batch process using Statement and PreparedStatement interfaces.
Example to insert records in a batch process using Statement and PreparedStatement interfaces.
Example to insert records in a batch process via Statement interface.
Example to update records in a batch process via Statement interface.
Example to insert records in a batch process via PreparedStatement interface.
Example to update records in a batch process via PreparedStatement interface.
Example to dynamically insert rows using StringBuilder and PreparedStatement placeholders ?.
This article provides how to retrieve column names of a table using getMetaData() method.
Example of how to use DataSource to connect with MySQL database.