title: select top ? * from a table - where '?' is configurable
body: <p>I am using spring JdbcTemplate. I have a query like this <strong>select top ? * from table</strong> and i am setting the value of ? from a calling method like this :</p>
  
  <pre><code>jdbcTemplate.query(new PreparedStatementCreator() {
          @Override
          public PreparedStatement createPreparedStatement(final Connection connection) throws SQLException {
              return connection
                      .prepareStatement(**select top ? * from table**);
          }
      }, new PreparedStatementSetter() {
          @Override
          public void setValues(final PreparedStatement ps) throws SQLException {
              ps.setLong(1, 5);
          }
      },
      new ResultSetExtractor&lt;Object&gt;() {
          @Override
          public List&lt;Object&gt; extractData(final ResultSet rs) throws SQLException {
              final List&lt;Object&gt; objects = Lists.newArrayList();
              //assume there is correct code
              return objects;
          }
      });
  </code></pre>
  
  <p>But this is throwing me a BadSqlGrammerException : incorrect syntax near @PO.</p>
  
  <p>Appreciate the help!!</p>