Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: execute incorect query and get data



=?ISO-8859-2?Q?Marek_Wr=F3bel?= <mwrobel(at)icentrum(dot)pl> writes:
> create table a (a1 integer);
> create table b (b1 integer);
> insert into a (a1) values (1);
> insert into a (a1) values (2);
> select a1 from b;
> ERROR:  column "a1" does not exist at character 8
> but :
> select a1 from a where a1 not in (select a1 from b);

This is not a bug, it's an outer reference.  Read any SQL book ...

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group