JDBC Tutorials

The Java Database Connectivity (JDBC) API enable Java application to interact with a database. In this tutorials, it provides many step by step examples on using JDBC Statement, PreparedStatement , CallableStatement , JDBC Transaction and how to integrate with other frameworks like Spring.

Happy learning JDBC :)

Quick Start

Some quick guides to show how JDBC interact with databases like MySQL, Oracle and PostgreSQL.

JDBC & Statement

The “Statement” interface is used to execute a simple SQL statement with no parameters. For create, insert, update or delete statement, uses “Statement.executeUpdate(sql)“; select query, uses “Statement.executeQuery(sql)“.

JDBC & PreparedStatement

The “PreparedStatement” interface is extended “Statement”, with extra feature to send a pre-compiled SQL statement with parameters. For create, insert, update or delete statement, uses “PreparedStatement.executeUpdate(sql)“; select query, uses “PreparedStatement.executeQuery(sql)“.

JDBC & Stored Procedure

JDBC CallableStatement and Stored Procedure, IN, OUT, CURSOR examples.

JDBC Transaction example

JDBC Trasaction how to :

JDBC Integration example

Integrate JDBC with other frameworks.

FAQ

Reference

Tags :
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider making a donation to the charity, thanks.

Related Posts

Popular Posts