Re-execute the statement with another sql without close
Will The first statement sent to the database be close after the execution the second?
String sql = "select * from emp";
Statement stmt = cn.createStatement();
ResultSet rs = stmt.executeQuery(sql);//first
while(rs.next()){
......
}
sql = "select * from dept";
rs = stmt.executeQuery(sql); //second
while(rs.next()){
......
}
Thanks Guilherme.

