Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Selecting data from 2 similar tables
"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