Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: create view
Or do you mean
select name,age,date_col
from table1
union all
select name, age, null date_col
from table2?
(By the way, never use 'date' as a name for something, in this example I've replaced it by 'date_col')
Jaap.
juilius heeft geschreven in bericht ...
>
>
>you need to have a join clause!!!
>
>otherwise you will get a cartesian product, i.e. a combination of every row
>with a row on other table. so if each table have 10,000 rows you will end
up
>with a view with 100,000,000 rows
>
>
>do
>
> select t1.name,
> t1.age,
> t1.date,
> t2.name,
> t2.age
> from table1 t1,
> table2 t2;
>where t1.name = t2.name
>
>read up on outer joins etc for more info
>
>
>In article <388f16b2.605280512_at_news.pwgsc.gc.ca>, NeedaHoliday wrote:
>>create view as
>>
>> select t1.name,
>> t1.age,
>> t1.date,
>> t2.name,
>> t2.age
>> from table1 t1,
>> table2 t2;
>>
>>
>>On Wed, 26 Jan 2000 12:54:13 GMT, him_lommel_at_t-online.de (Andreas
>>Lommel) wrote:
>>
>>>Hi there
>>>
>>>How can I create a view on 2 tables ?
>>>
>>>table1: name,age,date
>>>table2: name,age
>>
Received on Wed Jan 26 2000 - 11:38:25 CST