Received: from mozart.si.ualg.pt (mozart.si.ualg.pt [193.136.224.2]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5BGSDE74219 for ; Mon, 11 Jun 2001 12:28:14 -0400 (EDT) (envelope-from llsousa@ualg.pt) Received: from ualg.pt (llsousa@corisco.uceh.ualg.pt [10.10.20.126]) by mozart.si.ualg.pt (8.9.1/8.9.1) with ESMTP id RAA406663; Mon, 11 Jun 2001 17:27:38 +0100 (WEST) Message-ID: <3B24F179.F2695957@ualg.pt> Date: Mon, 11 Jun 2001 17:27:37 +0100 From: Luis Sousa Organization: Universidade do Algarve X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-compact i686) X-Accept-Language: en, pt MIME-Version: 1.0 To: Peter Eisentraut CC: pgsql sql Mailing List Subject: Re: Hidden Select References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200106/159 X-Sequence-Number: 3380 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 !!!????? I hope you understand what i mean Best regards Luis Sousa Peter Eisentraut wrote: > Luis Sousa writes: > > > I have a query that joins several table with some restrictions. > > I want to take out those restrictions from the query and create a view > > that does not show the fields that are used to restrict the data, but in > > some way, i can restrict that data when i call the view. > > 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@gmx.net http://funkturm.homeip.net/~peter