JDBC Statement Example

Advertisement

In this tutorial you will learn java.sql.Statement interface and also how to use this interface in your application.

JDBC Statement

JDBC Statement is an interface of java.sql.*; package. It is used for
execution of SQL statements. It returns a ResultSet object. This result set
object contains the result of the query. Statement interface provides basic
method for SELECT, INSERT, UPDATE, DELETE operations in the database. Its query
is compiled every time when request is made, therefore is little slower in
comparison to PreparedStatement.

An example given below which illustrate to JDBC Statements interface. This
example creates a table named StudentDetail in student database.