Re: What's it: NOTICE: Adding missing FROM-clause entry

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Vitaliy V(dot) Romanets" <vitaliy(at)gu(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What's it: NOTICE: Adding missing FROM-clause entry
Date: 2001-06-25 15:02:34
Message-ID: 200106251502.f5PF2Z405391@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hi All! :)
> There are two tables:
> test(a int4,b varchar(20));
> test2(c int4,d varchar(20));
> I do the following:
> select a,b,test2.d from test where a=test2.c;

Try this:

> select a,b,test2.d from test test2 where a=test2.c;

You are creating a 'test' reference and a 'test2' reference, which I
doubt is what you wanted.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-06-25 15:05:04 Re: Red Hat to support PostgreSQL
Previous Message Daniel Åkerud 2001-06-25 14:55:08 Re: Foreign Keys Constraints, perforamance analysis