title: MyBatis create multiple tables for MySQL
body: <p>As you can imagine, </p>
  
  <pre><code>CREATE TABLE table1(id int);
  CREATE TABLE table2(id int);
  </code></pre>
  
  <p>is easy executable on MySQL and on nearly every other SQL-Database.</p>
  
  <p>This </p>
  
  <pre><code>&lt;update id="test"&gt;
    CREATE TABLE table1(id int);
    CREATE TABLE table2(id int);
  &lt;/update&gt;
  </code></pre>
  
  <p>is executable on MS SQL Server, but not on a MySQL-Database. Error:</p>
  
  <pre><code>Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException: 
  ### Error updating database.  Cause: 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 'CREATE TABLE table2(id int)' at line 2
  ### The error may involve defaultParameterMap
  ### The error occurred while setting parameters
  ### SQL: CREATE TABLE table1(id int); CREATE TABLE table2(id int);
  </code></pre>
  
  <p>Any ideas, why this is the case?</p>
  
  <p>EDIT:</p>
  
  <pre><code>&lt;update id="test"&gt;
    CREATE TABLE table(id int);
  &lt;/update&gt;
  </code></pre>
  
  <p>.. is working everywhere.</p>
  
  <p>EDIT for clarification:
  My complete mybatis mapper.xml.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE mapper
   PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
   "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;
   &lt;mapper namespace="InitializationMapper"&gt;
     &lt;update id="test"&gt;
        CREATE TABLE table1(id int);
        CREATE TABLE table2(id int);
     &lt;/update&gt;
  &lt;/mapper&gt;
  </code></pre>