Use this method to execute SQL-Query-Statements such as
select from. Example:
sql.query("SELECT id, name FROM customer WHERE id > 0",
new ResultSetIterator() {
public void forEachRow(ResultSet rs) throws SQLException {
System.out.println(rs.getString("name"));
}});
Use this method to execute modifying SQL-statements such as
insert into or update. Example:
sql.update("INSERT INTO customer (id, name) VALUES (1, 'John Smith')");