Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: two tables, one result set, but no join!
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