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.
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
I could insert values of A and B in one column of some temp table and do a select distinct over that column.
Anything more sophisticated (performancewise)?