Re: Hidden Select

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Luis Sousa <llsousa(at)ualg(dot)pt>
Cc: pgsql sql Mailing List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Hidden Select
Date: 2001-06-11 16:34:42
Message-ID: Pine.LNX.4.30.0106111834060.756-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Luis Sousa writes:

> Suposing your example:
>
> Now i want to do a query to the view like this:
>
> SELECT * FROM C WHERE id=1;
>
> I whant to chose the id, but that id isn't in my select list !!!?????

Then you will have to define your view differently.

> > Do you mean like this?
> >
> > create table A (id int, content text);
> > create table B (id int, stuff numeric);
> > create view C as select A.content, B.stuff from A, B where A.id = B.id;

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Richards 2001-06-11 16:40:45 finding a maximum or minimum sum
Previous Message Luis Sousa 2001-06-11 16:27:37 Re: Hidden Select