title: Sqlite: How to insert variable into string in prepared statement
body: <p>I'm using a Java wrapper for accessing Sqlite but I assume this is a general Sqlite question.</p>
  
  <pre><code>String stmt = "SELECT foo FROM bah WHERE foo='%/?/%';
  PreparedStatement a = myConn.prepareStatement(stmt);
  
  a.setString(1, "hello");
  a.executeQuery();
  </code></pre>
  
  <p>... throws an exception - it doesn't like the ? being inside quotes. Everything is fine if I do </p>
  
  <pre><code>...WHERE foo=?
  </code></pre>
  
  <p>but this isn't the statement I want.</p>
  
  <p>How can I insert a variable into such a prepared statement? If you forget about the fact I'm using Sqlite, how is this is done using other database technologies?</p>