title: SQL: Select multiple rows with the same ID
body: <p>I have a bit of a problem. I have a table with names, IDs and different geometry like so:</p>
  
  <pre><code>ID  |  Name| RealID| Geometry| 
  ==========================================
  1   |      Hampshire     |   3   |  0762453...
  2   |      Hampshire     |   3   |  0156245...
  3   |      Salt Lake     |   2   |  312455...
  4   |      Hampshire     |   3   |  016422....
  </code></pre>
  
  <p>I have a need of selecting all Hampshire rows based on a list of IDs. As you can see my table has different geometries for say Hampshire.
  I need all of them somehow by just comparing against one ID I get from a list of them.</p>
  
  <p>I get the list of IDs from Java. It is simply a list with one ID(3) so far.</p>
  
  <p>Doing this: </p>
  
  <pre><code>Select * from table where RealID = any(:listOfIds)
  </code></pre>
  
  <p>It only returns me one row no matter what if I send in Hampshire's ID in the list (3). I have tried something like this:</p>
  
  <pre><code>Select * from table where RealID IN (any(:listofids))
  </code></pre>
  
  <p>but the syntax is wrong and I'm not sure what to do to achieve my goal.</p>