title: Need to find out if all columns in a SQL Server table have the same value
body: <p>I have the task to find out if all columns in a SQL Server table have exact the same value. The table content is created by a stored procedure and can vary in the number of columns. The first column is an ID, the second and the following columns must be compared if the all columns have exact the same value.</p>
  
  <p>At the moment I do not have a clue how to achieve this.</p>
  
  <p>The best solution would be to display only the rows, which have different values in one or multiple columns except the first column with ID. </p>
  
  <p>Thank you so much for your help!!</p>
  
  <p>--> Edit: The table looks this:</p>
  
  <pre><code>ID   Instance1     Instance2     Instance3      Instance4      Instance5
  =====================================================
  A    1                    1                     1                     1                      1
  B    1                    1                     0                     1                      1
  C    55                  55                  55                   55                    55
  D    Driver            Driver            Driver             Co-driver         Driver
  E     90                 0                     90                  0                       50   
  F     On                 On                  On                 On                    On        
  </code></pre>
  
  <p>The result should look like this, only the rows with one or multiple different column values should be display.   </p>
  
  <pre><code>ID   Instance1     Instance2     Instance3      Instance4      Instance5
  =====================================================
  B    1                    1                     0                     1                      1
  D    Driver            Driver            Driver             Co-driver         Driver
  E     90                 0                     90                  0                       50   
  </code></pre>
  
  <p>My table has more than 1000 rows and 40 columns</p>