t-sql help on read 1 table 2 columns data and look for result

Hi I have the following example problem:


TEST_TB:

LOC_ID                  LOC_ID2
------                  -------
11111                  11111
11112                  11112
11113                  11114
11114                  11114
11112                  11115



RESULT
------
11111
11112
11113
11114
11115

the result is reading the TEST_TB table, column LOC_ID and LOC_ID2, distinct the LOC_ID and LOC_ID2 values.

Thanks
jfreeman2010Asked:
Who is Participating?
 
Ephraim WangoyaCommented:
select LOC_ID from TEST_TB
union
select LOC_ID2 from TEST_TB
0
 
jfreeman2010Author Commented:
THANKS!!
0
 
jfreeman2010Author Commented:
THANKS,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.