I just like to check if there is a more efficient way of doing the
Currently I need to execute two SQL statements; the second SQL statement
depends on the results of the first SQL statement.
To do this, I have used 'two' Statement objects and 'ResultSet' objects, as
otherwise the first ResultSet will be cleared when another SQL statement is
I'm wondering whether this is the correct thing to do in such a situation.
As I think it can get really out of hand if I have to execute say five or
six SQL statements and then having to create five or six 'Statement'
Any help or discussion on this is much appreciated.
Thanks in Advance.