title: how to create multiple tables in same database in SQLite on mobile application?
body: <p>I have a part of my code creating and opening database but I have problem because I want to create two tables in the same database. How can I do it?</p>
  
  <pre><code>private var db:File = File.userDirectory.resolvePath("DataBase.sql");
          private var conn:SQLConnection;
          private var createTableStmt:SQLStatement;
          private var createTableSQL:String =
              "CREATE TABLE IF NOT EXISTS RecipeDB (" +
              "RecipeID INTEGER PRIMARY KEY AUTOINCREMENT," +
              "Name VARCHAR(20)," + "Category VARCHAR(20)," + "Origin VARCHAR(20)," + "Recipe VARCHAR(2000)," + "Favorite BOOL)";
  
          private var selectStmt:SQLStatement;
          private var selectSQL:String = "SELECT * FROM RecipeDB";
          private var insertStmt:SQLStatement;
          private var insertSQL:String =
              "INSERT INTO FoodDish2 (Name, Category, Origin, Recipe)" +
              "VALUES (:Name, :Category, :Origin, :Recipe)";
          protected function application1_applicationCompleteHandler
          (event:FlexEvent):void
          {
              conn = new SQLConnection();
              conn.addEventListener(SQLEvent.OPEN, openHandler);
              conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
              conn.openAsync(db);
          }
          private function openHandler(event:SQLEvent):void {
              log.text += "Database opened successfully";
              conn.removeEventListener(SQLEvent.OPEN, openHandler);
              createTableStmt = new SQLStatement();
              createTableStmt.sqlConnection = conn;
              createTableStmt.text = createTableSQL;
              createTableStmt.addEventListener(SQLEvent.RESULT, createResult);
              createTableStmt.addEventListener(SQLErrorEvent.ERROR,
                  errorHandler);
              createTableStmt.execute();
          }
  </code></pre>
  
  <p>I've tried to do it in one statement </p>
  
  <pre><code>private var createTableSQL:String ="CREATE TABLE IF NOT EXISTS RecipeDB(
  RecipeID INTEGER PRIMARY KEY AUTOINCREMENT,
  Name VARCHAR(20),
  Category VARCHAR(20),
  Origin VARCHAR(20),
  Recipe VARCHAR(2000));
  
  CREATE TABLE IF NOT EXISTS IngredientDB(
  RecipeID INTEGER REFERENCES RecipeDB(RecipeID),
  Ingredient VARCHAR(20),
  Quantity VARCHAR(20));"
  </code></pre>
  
  <p>but failed, </p>