JDBC Statement Interface
Advertisements
Statement Interface in JDBC
The Statement interface provides methods to execute queries with the database.
Method of Statement Interface
method | Description | |
---|---|---|
1 | public ResultSet executeQuery(String sql) | Used to execute SELECT query. It returns the object of ResultSet. |
2 | public int executeUpdate(String sql) | Used to execute specified query, it may be create, drop, insert, update, delete etc. |
3 | public boolean execute(String sql) | Used to execute queries that may return multiple results. |
4 | public int[] executeBatch() | Used to execute batch of commands. |
Google Advertisment