JDBC is the abbreviation of Java Database Connectivity. Using JDBC, java application can communicate with numerous databases such as
Access, ibatis, Mysql, PostgreSQL, Sql Server, Oracle and DB2 etc.
After you write java application, you can swap between different databases without the need to change the code, what you need to do is just change the database settings in configuration file.
In this tutorial we will introduce JDBC concepts and components such as
Statement, Connection, ResultSet, PreparedStatement and CallableStatement. We will show you examples about how to use them.
- Connect Oracle DB Example
- Connect MySQL Database Server
- Connect PostgreSQL Database
- Connect Microsoft SQL Server
- Get Database Meta Data Example
- Load JDBC Configuration From Properties File Example
- Use Statement To Create Table
- Statement Examples – Insert, Update, Select and Delete
- Statement Examples – Batch Insert, Update, Delete
- PreparedStatement Example – Create Table, Insert, Update, Delete Records
- PreparedStatement Example – Select Data List From Table
- PreparedStatement Example – Batch Insert, Update, Delete
- CallableStatement Stored Procedure Input Parameters Example
- CallableStatement Stored Procedure Output Parameters Example