title: Executing multiple native queries in one go
body: <p>I'm wondering if it is possible to execute several semicolon-separated SQL update queries with one <code>SQLQuery#executeUpdate()</code> call in Hibernate (3.2).</p>
  
  <p>I have string containing multiple updates like this:</p>
  
  <pre><code>String statements = "UPDATE Foo SET bar=1*30.00 WHERE baz=1; 
                       UPDATE Foo SET bar=2*45.50 WHERE baz=2;...";
  </code></pre>
  
  <p>I'm trying to do</p>
  
  <pre><code> Query query = session.createSQLQuery(statements);
   query.executeUpdate();
  </code></pre>
  
  <p>But keep getting the following error</p>
  
  <pre><code>com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
  You have an error in your SQL syntax; check the manual that corresponds to 
  your MySQL server version for the right syntax to use near 
  'UPDATE Foo SET bar=Y WHERE ' at line 3
  </code></pre>
  
  <p>If I execute the contents of the <code>statements</code> by hand I get no errors so I'm assuming the multiple semicolon-separated queries are causing trouble somewhere in Hibernate or JDBC. </p>
  
  <p>Is it better to just split the <code>statements</code>string and do <code>createSQLQuery(statement).executeUpdate()</code> individually for each line?  </p>