Received: from sunu450.rz.ruhr-uni-bochum.de (sunu450.rz.ruhr-uni-bochum.de [134.147.64.5]) by hub.org (8.9.3/8.9.3) with SMTP id MAA63767 for ; Sun, 23 Jan 2000 12:39:57 -0500 (EST) (envelope-from dorthe@luebbert.net) Message-Id: <200001231739.MAA63767@hub.org> Received: (qmail 15535 invoked from network); 23 Jan 2000 17:39:59 -0000 Received: from dialppp-5-242.rz.ruhr-uni-bochum.de (HELO baer) (134.147.5.242) by mailhost.rz.ruhr-uni-bochum.de with SMTP; 23 Jan 2000 17:39:59 -0000 From: "Dorthe Luebbert" Organization: Dorthe Luebbert, Dortmund To: pgsql-sql@hub.org Date: Sun, 23 Jan 2000 18:38:55 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Subject: Join-Question Reply-to: dorthe@luebbert.net CC: luebbert@globalpark.de Priority: normal In-reply-to: <200001231725.MAA59152@hub.org> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from Quoted-printable to 8bit by hub.org id MAA63826 Hi, I have a problem retrieving information from serveral different tables. For example: I have three tables: Table 1 contains that person X has the hobby nr. 1, person 2 has hobby nr 42 etc (fields: person_id, hobby_nr) Table 2: Hobby nr 1 is "soccer", hobby nr 2 is "jazz" (fields: hobby_nr, hobby_text) Table 3 contains the first and last name for the persons in table nr 1 (fields person_id, first_name, last_name). Now I want to find out for example the following: If someone looks for a hobby, find out the first and last name of those who like hobby nr 1. If someone does not look for hobby, just print out all the names in the database. In MySQL I would do something like a LEFT JOIN, wouldn´t I? But in Postgres I could not find anything about left or right joins. Any idea how to solve this problem?? Thanx so much for your help Dorthe