Click here to Skip to main content
14,877,782 members
Please Sign up or sign in to vote.
4.20/5 (2 votes)
See more:
I want to built query in sql server that merge two columns of table

If I have two columns like,

Column1 | Column2
1                5
2                6
3                7
4                8

I want output like,

Column1
1
2
3
4
5
6
7
8
Posted
Updated 28-May-14 0:23am
v2

1 solution

try this.. :)

SQL
select Column1 from TableName
union all
select Column2 from TableName
   
Comments
pareshpbhayani 28-May-14 6:27am
   
Wow it's work thank you so much ...
Nirav Prabtani 28-May-14 6:32am
   
Mark my answer as solved

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900