title: sqlite:How to use in memory
body: <p>I am trying to store my data in memory</p>
  <p>here is what i have right now</p>
  <pre class="lang-java prettyprint-override"><code>//sq lite driver
  Class.forName(&quot;org.sqlite.JDBC&quot;);
  //database path, if it's new data base it will be created in project folder
  con = DriverManager.getConnection(&quot;jdbc:sqlite:mydb.db&quot;);
  
  Statement stat = con.createStatement(); 
  
  stat.executeUpdate(&quot;drop table if exists weights&quot;);
  
  //creating table
  stat.executeUpdate(&quot;create table weights(id integer,&quot;
      + &quot;firstName varchar(30),&quot; + &quot;age INT,&quot; + &quot;sex varchar(15),&quot;
      + &quot;weight INT,&quot; + &quot;height INT,&quot;
      + &quot;idealweight INT, primary key (id));&quot;);
  </code></pre>
  <p>Now where should i put this statement[ &quot;:memory:&quot;]  to store my this data in memory and the data should keep saved until i delete it .</p>
  <p>Thanks</p>