JDBC

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database. It is a Java-based data access technology used for Java database connectivity.

 

Main Page:- JDBC tutorial and examples

Statement vs PreparedStatement

In this post we will discuss the main differences between Statement and PreparedStatement object, and when we should use which object. Statement object:- It is the object of a JDBC driver software supplied Java class that implements java.sql.Statement(I). It is also called as Simple Statement because it is used with simple SQL statements without parameters. […]

Statement vs PreparedStatement Read More »

Different Types of Statements in JDBC

Different Types of Statements in JDBC | There are three types of statements in JDBC, Statement object (Or Simple Statement object):- It is the object of a JDBC driver software supplied Java class that implements java.sql.Statement(I). It is also called as Simple Statement because it is used with simple SQL statements without parameters. PreparedStatement object:-

Different Types of Statements in JDBC Read More »

JDBC Statement Example Programs

In the previous post, we had developed a JDBC program to select records from a table using Statement Interface. Now in this post, we will develop the JDBC Statement example program for insert, update, and delete queries. Here we will use Oracle database software, but you can work with any database with a suitable JDBC

JDBC Statement Example Programs Read More »

JDBC Statement Interface

In JDBC the Statement is an interface that represents a SQL statement. We execute Statement objects, and for select queries, ResultSet objects will be generated, which is a table of data representing a database result set. We need a Connection object to create a Statement object. There are three types of JDBC statements1) Statement2) PreparedStatement3)

JDBC Statement Interface Read More »

How to get Connection in JDBC

To develop a JDBC application, the most important part is to get connection. In this post, we will discuss how to create or get a JDBC connection. We will see the same codes to get a JDBC connection with different database software. A Connection object represents a connection with a database. When we connect to

How to get Connection in JDBC Read More »

DriverManager class in Java

DriverManager class in Java is a member of the java.sql package which is a part of JDBC API. DriverManager class acts as the primary mediator between our java application and the drivers of the database we want to connect with. The JDBC driver manager is a very important class that defines an object which connects

DriverManager class in Java Read More »

Java SQL Package

In Java programming language, the java.sql package contains many classes and interfaces for database connectivity. In this post, we will discuss the important classes and interfaces of the Java SQL package. The latest JDBC API is mainly divided into two packages, 1. java.sql package:- This package includes the classes and interfaces to perform almost all

Java SQL Package Read More »