title: Android SQLite - creating two tables at once
body: <p>I am trying to create two SLite tables at once in <code>onCreate(SQLiteDatabase database)</code> function in object extending SQLiteOpenHelper but it stops during first creation of table DB object(it work fine when I comment out the second query)</p>
  
  <p>This is my onCreate function:</p>
  
  <pre><code>@Override
  public void onCreate(SQLiteDatabase database) {
      String query = "CREATE TABLE users ( userID INTEGER PRIMARY KEY, login TEXT, password TEXT, name TEXT, "
              + "phone TEXT, country TEXT, balance TEXT)";
  
      String query2 = "CREATE TABLE transactions ( transactionID INTEGER PRIMARY KEY, "
              + "from TEXT, to TEXT, amount TEXT, title TEXT)";
  
      database.execSQL(query);
      database.execSQL(query2);
  }
  </code></pre>
  
  <p>I've also tried to put this in one query like this:</p>
  
  <pre><code>String query = "CREATE TABLE users ( userID INTEGER PRIMARY KEY, login TEXT, password TEXT, name TEXT, "
                  + "phone TEXT, country TEXT, balance TEXT) CREATE TABLE transactions ( transactionID INTEGER PRIMARY KEY, "
                  + "from TEXT, to TEXT, amount TEXT, title TEXT)";
  </code></pre>
  
  <p>then it works but stops my app when I want to get data from <code>transactions</code> table (<code>users</code> table works fine though)</p>
  
  <p>What am I doing wrong?</p>