title: Is it possible to execute multiple statements in a single query using DBD::Oracle?
body: <p>I'd like to know if it's possible to execute more than one SQL statement within a single <a href="http://search.cpan.org/dist/DBI#execute" rel="nofollow noreferrer"><code>execute()</code></a> or <a href="http://search.cpan.org/dist/DBI#do" rel="nofollow noreferrer"><code>do()</code></a> call using <a href="http://search.cpan.org/dist/DBD-Oracle" rel="nofollow noreferrer"><code>DBD::Oracle</code></a> via Perl <a href="http://search.cpan.org/dist/DBI" rel="nofollow noreferrer"><code>DBI</code></a>.  Example:</p>
  
  <pre><code># Multiple SQL statements in a single query, separated by a ";"
  $sql = 'UPDATE foo SET bar = 123; DELETE FROM foo WHERE baz = 456';
  
  $sth = $dbh-&gt;prepare($sql);
  $sth-&gt;execute;
  
  # ...or...
  
  $dbh-&gt;do($sql);
  </code></pre>
  
  <p>I ask this not because I want to actually do such a thing, but rather because I want to gauge the damage possible through a successful SQL injection attack.  And yes, I know that, regardless of the answer to this question, the possibility of SQL injection must still be eliminated at its root using bind values and trusted input only, etc.  But the question still stands: is it possible to make <code>DBD::Oracle</code> execute multiple statements?</p>
  
  <p>As a related example, <a href="http://search.cpan.org/dist/DBD-mysql/" rel="nofollow noreferrer"><code>DBD::mysql</code></a> has a <a href="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm#mysql_multi_statements" rel="nofollow noreferrer"><code>mysql_multi_statements</code></a> connection option that explicitly enables this "feature."  I can't shake the feeling that there's some similar, perhaps undocumented and obscure Oracle OCI option that's accessible somehow via <code>DBD::Oracle</code> that will enable the same thing.</p>
  
  <p>In case it matters, this is:</p>
  
  <ul>
  <li><code>perl</code> 5.8.8</li>
  <li><code>DBD::Oracle</code> 1.22</li>
  <li>Oracle 11g (11.01.0700)</li>
  </ul>