SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Combining Tables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mosiki
Starting Member

12 Posts

Posted - 06/21/2013 :  06:36:51  Show Profile  Reply with Quote
Hi

I have two tables with the exact same layout (column wise), and would like to show all data from two tables as one result set.

Table A has 581 Rows
Table B has 80 Rows

I need the result set to show selected columns with all 661 rows of data. there are no primary keys in any of the two tables. Number of columns and column names are exactly the same.

Many Thanks

Mosiki.

bandi
Flowing Fount of Yak Knowledge

India
2202 Posts

Posted - 06/21/2013 :  06:41:17  Show Profile  Reply with Quote
SELECT Column-list FROM Table1
UNION ALL
SELECT Column-list FROM Table2


--
Chandu
Go to Top of Page

bandi
Flowing Fount of Yak Knowledge

India
2202 Posts

Posted - 06/21/2013 :  06:41:48  Show Profile  Reply with Quote
SELECT Column-list FROM Table1
UNION ALL
SELECT Column-list FROM Table2


--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000