Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Selecting data from 2 similar tables

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@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 Thu Aug 17 2000 - 21:22:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US