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

Home -> Community -> Usenet -> c.d.o.server -> Re: create view

Re: create view

From: juilius <juilous_at_hotmail.com>
Date: 26 Jan 2000 09:56:11 -0600
Message-ID: <sOEj4.3165$in3.23108@newscene.newscene.com>

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 - 09:56:11 CST

Original text of this message

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