I have a question related to this method: st.execute(sql); where st obviously is a Statement object.
Directly from this oracle java tutorial:
What do they mean by "one or more ResultSet objects"?
The javadoc for the execute method says this:
"Executes the given SQL statement, which may return multiple results. In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string."
That pretty much explains it. Sometimes a query can deliver more than one ResultSet.
if so how is it possible to manage them once got an array of ResultSet?
I'm not sure what you mean but:
It's not (at least to me) the aim of st.execute(sql) which can also return an int as if it was updated a table.
One use of execute is to execute an SQL statement if you don't know if it is a query, an update (of some kind) ... or something else that potentially delivers multiple result sets. It is a generalization of executeQuery() and executeUpdate() ...