UNION only corresponding columns need to be same data type and when using SQL UNION, only distinct values are selected (is similar to SELECT DISTINCT SQL Statement).
Syntax - UNION
(SQL Statement 1)
UNION
(SQL Statement 2)
Below is example for SQL UNION
Company | Sales($) | Website |
Sql Traniner | 2500 | http://www.sqltutorials.blogspot.com |
BeautyCentury | 3000 | http://beautycentury.blogspot.com |
TravelYourself | 2800 | http://travelyourself.blogspot.com |
Sales | Website |
2900 | http://www.sqltutorials.blogspot.com |
3000 | http://beautycentury.blogspot.com |
2800 | http://travelyourself.blogspot.com |
SQL UNION Statement
SELECT Sales FROM TABLE1
UNION
SELECT Sales FROM TABLE2
Result
Sales |
2500 |
2800 |
2900 |
3000 |
4 comments:
WoW nice blog buddy!Actually WoW is my favorite appreciation keyword. I also like to play. Wow Gold. I was looking for info regarding that and saw your website. Its nice and very interesting.
wow news
Good one
wow gold kaufen
Good post
buy c9 gold you laugh at me for being different, but I laugh at you for being the same, the past is gone and static. Nothing we can do will change it. The future is before us and dynamic. Everything we do will affect it cheap c9 gold, don't go around saying the world owes you a living. The world owes you nothing. It was here first c9 money.
The past is gone and static. Nothing we can do will change it.scarlet blade gold, the future is before us and dynamic. Everything we do will affect it rs gold, You laugh at mescarlet blade gold for being different , but I laugh at you for being the same.
Post a Comment