title: Compare to all columns
body: <p>Is it possible to compare a vector of values with all columns of a table in SQL, more specifically in MS SQL Server?</p>
  
  <p>For example, I have a table, EXAMPLE, with 3 columns:</p>
  
  <pre><code>EXAMPLE: ColA, ColB, ColC
  </code></pre>
  
  <p>And I want to check if its columns match a specific vector: ('val0', 'val1', 'val2')</p>
  
  <p>I know I can do that with a sentence like this:</p>
  
  <pre><code>SELECT * FROM EXAMPLE WHERE ColA='val0' AND ColB = 'val1' AND ColC = 'val2' 
  </code></pre>
  
  <p>But I'd like to know if there is some function, ALLEQUAL which could allow me to do something like:</p>
  
  <pre><code>SELECT * FROM EXAMPLE WHERE ALLEQUAL('val0', 'val1', 'val2');
  </code></pre>
  
  <p>I understand that if that function exists its syntax may be quite different between different RDBMSs and I now focused on Ms SQL Server. Nevertheless I will be more than happy if you can give me examples in other databases managers.</p>