Statement interface

In this post, we are going learn about java.sql.Statement.It provides methods to execute queries with the database. Some of the methods in statement interface returns ResultSet object.

Important Methods
public ResultSet executeQuery(String sql) It executes SELECT query and returns the object of ResultSet.
public int executeUpdate(String sql) It executes specified query, Like create, drop, insert, update, delete.
public boolean execute(String sql) It executes queries that may return multiple results.
public int[] executeBatch() It is used to execute batch( group or set) of commands.

SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment