title: How to use SELECT IN clause in JDBCTemplates?
body: <p>This is my first experience with JDBCTemplates and I ran into a case where I need to use a query that looks like this:</p>
  
  <pre><code>SELECT * FROM table WHERE field IN (?)
  </code></pre>
  
  <p>How do I do that? I already tried passing a list/array value but that didn't do the trick, I get an exception. My current code looks like this:</p>
  
  <pre><code>Long id = getJdbcTemplate().queryForLong(query, new Object[]{fieldIds});
  </code></pre>
  
  <p><a href="https://docs.spring.io/spring/docs/2.5.x/reference/jdbc.html" rel="nofollow noreferrer">Spring Documentation</a> states that there is no way of doing this besides generating the required number of "?" placeholders to match the size of the parameter List. Is there a workaround?</p>