title: SQL Server - distinct value from multiple(2) columns
body: <p>suppose I have two columns of integers, A and B. Now I want distinct values from these, meaning if both A and B have 1, I want 1 only once. </p>
  
  <p>Note: I am NOT interested in getting distinct rows. I just want to get unique integer values from this table which could either be in A or B </p>
  
  <p>I could insert values of A and B in one column of some temp table and do a select distinct over that column.  </p>
  
  <p>Anything more sophisticated (performancewise)?</p>