Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: complex view question
create view c (v_sku, v_type) as
select sku, type from a
union
select prod_id, type from b
/
Richard
Bob Skinner wrote:
>
> Is it possible to combine two tables with similar columns (same data
> type and functional use, but perhaps different column names) into a
> single view?
>
> Table A:
> SKU TYPE
> ----- ------
> B234 Book
> C991 Magazine
>
> Table B:
> PROD_ID TYPE
> --------- ------
> Z456 Book
> D123 Newspaper
>
> Desired View C:
> V_SKU V_TYPE
> ------ -------
> B234 Book
> C991 Magazine
> Z456 Book
> D123 Newspaper
>
> What does the SQL to create this view look like? Is it even doable?
>
> thanks,
> Bob Skinner
Received on Mon Sep 23 2002 - 18:36:16 CDT
![]() |
![]() |