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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL QUERY

Re: SQL QUERY

From: Janet A. Schmitt 5-3334 <schmitt_at_admin.uwex.edu>
Date: Tue, 5 Sep 2000 11:01:52 -0500
Message-Id: <10610.116220@fatcity.com>


Use the union operator.

create view view1 as
Select col1, col2, col3, col4 from table1 union
select col1, col2, col3, col4 from table2;

> Date: Mon, 04 Sep 2000 07:50:20
-0800
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Reply-to: ORACLE-L_at_fatcity.com
> From: "Suhen Pather" <PatherS5_at_telkom.co.za>
> Subject: SQL QUERY
> Organization: Fat City Network Services, San Diego, California

> Hi Gurus
>
> I require help with creating a view based on multiple tables.
> There are 22 tables that have the same column names.
> I need to create a view based on these tables so that each of the tables data is appended to the view.
>
> eg TABLE1
> COL1 COL2 COL3 COL4
> blah blah blah blah
> abcd defg jfjfkjf xyz
>
> TABLE2
> COL1 COL2 COL3 COL4
> what is my name
> where do I work
>
>
> If I combine the 2 tables into a view it must look like
>
> VIEW1
> COL1 COL2 COL3 COL4
> blah blah blah blah
> abcd defg jfkjf xyz
> what is my name
> where do I work
>
>
>
> Any help would be greatly appreciate
>
>
> TIA
>
> Suhen Pather
> Oracle DBA (OCP)
> Telkom SA
> Land +27 12 300 4025
> Mobile +27 82 770 9801
>
> --
> Author: Suhen Pather
> INET: PatherS5_at_telkom.co.za
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Sep 05 2000 - 11:01:52 CDT

Original text of this message

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