title: SQLite: near "DATABASE": syntax error
body: <p>When I try to create a database programatically in SQLite using java, it generates the following error in console.</p>
  
  <pre><code>java.sql.SQLException: near "DATABASE": syntax error
      at org.sqlite.DB.throwex(DB.java:288)
      at org.sqlite.NativeDB.prepare(Native Method)
      at org.sqlite.DB.prepare(DB.java:114)
      at org.sqlite.PrepStmt.&lt;init&gt;(PrepStmt.java:37)
      at org.sqlite.Conn.prepareStatement(Conn.java:224)
      at org.sqlite.Conn.prepareStatement(Conn.java:217)
      at org.sqlite.Conn.prepareStatement(Conn.java:206)
      at com.mmcal.build.BuildDB.executeQuery(BuildDB.java:46)
      at com.mmcal.build.BuildDB.createDB(BuildDB.java:19)
      at MainGen.main(MainGen.java:16)
  </code></pre>
  
  <p>My code is :</p>
  
  <pre><code>public class BuildDB {
  Connection connection;
  PreparedStatement ps;
  ResultSet rs;
  String qry;
  
  public void createDB() {
      qry = "CREATE DATABASE IF NOT EXISTS myDb";
      executeQuery(qry);
  }
  public boolean executeQuery(String qry) {
      int cnt = 0;
      boolean flag = false;
      connection = ConnectionMaster.connectDb();
      try {
          ps = connection.prepareStatement(qry);
          cnt = ps.executeUpdate();
          System.out.println(flag);
      } catch (SQLException e) {
          e.printStackTrace();
      }
      if (cnt == 0) {
          flag = true;
      }
  
      return flag;
  
  }
  }
  </code></pre>
  
  <p>What's the problem in my code or is this the correct way to create database in SQLite via programatically?</p>