Re: Selecting data from 2 similar tables
From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: Thu, 17 Aug 2000 19:22:11 -0700
Message-ID: <spp77m3087v176_at_corp.supernews.com>
Date: Thu, 17 Aug 2000 19:22:11 -0700
Message-ID: <spp77m3087v176_at_corp.supernews.com>
"Joseph Ranseth" <jransethNO_SPAM_at_worldcupfishing.com> wrote in message
news:0lxm5.1338$ak3.11104_at_news1.mts.net...
> I have 2 tables with similar data, and I need to get the rows from each.
>
> They are almost identical, they are NOT joined, or related, they just
> contain similar data. How can I get values from both, without having to
> merge the two tables?
>
> Is this clear enough?
>
> Thanks in Advance.....
>
> JR
Use a union:
select * from table1
union
select * from table2
You must have the same number of columns and datatypes for a union to work though. You can select dummy constants if you need to in order to get the same number of columns.
-Matt Received on Fri Aug 18 2000 - 04:22:11 CEST