title: JDBC: in set condition: can I pass a set as single param?
body: <p>In JDBC I can use question marks for query parameters, like this:</p>
  
  <pre><code>"SELECT * FROM users WHERE login = ?"
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>ps.setString(1, "vasya");
  </code></pre>
  
  <p>But how can I query for list of logins:</p>
  
  <pre><code>"SELECT * FROM users WHERE login IN ?"
  </code></pre>
  
  <p>suppose, I have</p>
  
  <pre><code>List&lt;String&gt; logins = ...
  </code></pre>
  
  <p>What should I type there:</p>
  
  <pre><code>ps.setWhat(1, what);
  </code></pre>
  
  <p>I could rewrite query as:</p>
  
  <pre><code>"SELECT * FROM users WHERE login = ? OR login = ? OR login = ?"
  </code></pre>
  
  <p>and then call setString in loop, but I'd like to know if it is possible to pass a set of elements as single param in query.</p>
  
  <p>Maybe there are vendor-specific extensions?</p>