by, 03-10-2012 at 08:39 AM (646 Views)
A Statement interface presents a SQL statement. Generations of the ResultSet objects take place in response of the execute Statement objects. ResultSet is a data table which presents the database result set.
To make Statement object, a connection object is needed. To create statement, consider this code:
Stmt = con.createStatement();
The following are the three different kinds of statements.
- Statement: Simple SQL statements are implemented by it without any parameters.
- PreparedStatement: SQL statements are pre compiled which may have input parameters.
- CallableStatement: Store procedures are executed by it which may have input/output parameters.