title: Does the SGBD oracle always execute the queries of an anonymous plsql in the same order?
body: <p>This a part of my code java constructing a function in an anonymous plsql block:</p>
  
  <pre><code>*String p ="FUNCTION get_result RETURN varchar2 AS "
  +"BEGIN "
  +"sql_error:='ok';"
  +query1+";"
  +query2+";"
  +query3+";"
  +"COMMIT;"
  +"RETURN sql_error; "
  +"EXCEPTION "
  +"when others then "
  +"ROLLBACK;"
  +"end;";*
  </code></pre>
  
  <p>where queries 1,2 and 3 are sql queries; sometimes query2 is not executed and this does not generate a transaction error and queries 1 and 3 and committed. I would like to Know how is it possible and, how can I correct it.
  I would like also to know which procedure is better between <strong>calling anonymous block statements</strong> and <strong>statement.addBatch</strong></p>
  
  <p>I want to know how the manage sessions that execute transaction that manipulate many sequences. 
  I found that using many seauences in a transaction causes errors that oracle do not send back to the user. Do they sometimes get the same value for 2 executions on sequence.nextval ?
  thank you</p>