title: Specifying a variable name in QUERY WHERE clause in JDBC
body: <p>Could someone please give me a link on how to create a query in JDBC that gets a variable name in the WHERE statement, or write an example, to be more specific, my code looks something like this:</p>
  
  <pre><code>      private String getLastModified(String url) {
       String lastModified = null;
       ResultSet resultSet;
  String query = "select LastModified from CacheTable where " + 
       " URL.equals(url)";
       try {
        resultSet = sqlStatement.executeQuery(query);
  }
  </code></pre>
  
  <p>Now I need the syntax that enables me to return a ResultSet object where URL in the cacheTable equals url from the method's argument.</p>
  
  <p>thanks</p>