0

(1) When you open multiple cursors in a stored procedure, and then use a JDBC callable statement to iterate through the result sets, each in turn, are the order in which they are returned the same order in which they cursors are opened in the stored procedure? Or reverse of that? Or....?

(2) Is there a way to specify by sequence number or name which result set to process first?

David Neuschulz
  • 959
  • 1
  • 8
  • 14

1 Answers1

0

For 1: The order of returned resultsets is undefined for JDBC, so it will depend on your actual database system. That said, it would be highly illogical for a stored procedure to return results in a different order than the order they are produced by the stored procedure.

For 2: Once again, this is not defined by JDBC. However I haven't heard of database systems that would allow you to control the order of returned results by any means other than their order in the stored procedure.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197