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

Home -> Community -> Usenet -> c.d.o.misc -> Re: two tables, one result set, but no join!

Re: two tables, one result set, but no join!

From: <andrewst_at_onetel.com>
Date: 31 May 2005 07:41:34 -0700
Message-ID: <1117550494.596941.147020@f14g2000cwb.googlegroups.com>


Raj wrote:
> Hi,
>
> I don't even know if this is possible, so any help is gratefully received.
>
> I would like to extract rows from two different tables, having the same
> columns, into one result set.
>
> So, if Table A has col1 and col 2, and Table B has col1 and col2, then I
> would like a query to return:
>
> col1, col2 (from Table A)
> col1, col2 (from Table A)
> col1, col2 (from Table A)
> col1, col2 (from Table B)
>
> for example.
>
> Is this possible? Is this some type of join? I can see how to do it if the
> column names were different, but I don't want to join the tables, just get
> the data is one result set if possible.

Use UNION. Received on Tue May 31 2005 - 09:41:34 CDT

Original text of this message

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