title: Postgresql: the best way to check if column is equal to multiple values simultaneously
body: <p>If I want to check if a column is equal to one or other value, I write: </p>
  
  <pre><code>where col1 in (1, 4, 9);
  </code></pre>
  
  <p>But if I want to check if a column is equal to those values simultaneously,
  I should write:</p>
  
  <pre><code>where col1 = 1 and col1 = 4 and col1 = 9;
  </code></pre>
  
  <p>Is there in SQL any short form for this, like in?</p>
  
  <p>Example:</p>
  
  <pre><code>c1  |  c2
  ----------- 
  1   |  1
  1   |  2
  1   |  3
  </code></pre>
  
  <p>Select c1 from tablename where c2 = 1 and c2 = 2;</p>
  
  <p>In result set I want <strong>1</strong></p>