Re: Combining two tables into a view

From: Dennis Hart <dennis_at_csadfa.cs.adfa.oz.au>
Date: Thu, 22 Apr 1993 09:30:53 GMT
Message-ID: <1993Apr22.093053.5462_at_sserve.cc.adfa.oz.au>


In article <1r17scINN1kf_at_cronkite.cisco.com>, pkane_at_diablo.cisco.com (Peter Kane) writes:
> I have two tables with the same fields, such as:
>
> table1: so_num char(10), prod char(10), price number
>
> table2: so_num char(10), prod char(10), price number
>
> and I would like to create a view so that these two tables
> look like one table. I've tried creating a view where the
> 'as' clause has two selects and a 'plus' between them, but
> I couldn't get that to work.
>
> Any suggestions?
>
I think what you want to do is:

	creat view whatever as
	((select * from table1) union (select * from table2));

Cheers, Dennis Hart

> Thanks,
>
> Peter
> pkane_at_cisco.com
Received on Thu Apr 22 1993 - 11:30:53 CEST

Original text of this message