Received: from eba-haus.de ([149.228.241.143]) by hub.org (8.10.1/8.10.1) with SMTP id e64CkeS48764 for ; Tue, 4 Jul 2000 08:46:41 -0400 (EDT) Received: from kopo001 by eba-haus.de;Tue, 04 Jul 2000 12:46:23 GMT with Novell_GroupWise; Tue, 04 Jul 2000 14:46:24 +0200 Message-Id: X-Mailer: Novell GroupWise 5.5.2 Date: Tue, 04 Jul 2000 14:46:18 +0200 From: "Gerhard Dieringer" To: " Cc: Subject: Antw: LEFT JOIN Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id e64CkfS48766 X-Archive-Number: 200007/22 Antti Linno wrote: > Greetings. > I have a problem. I have 2 tables. E.g. work and workers. I want to > select records, that 1st table has, and the second hasn't(both have id > attribute). I mean I can't do it with is NULL, because those records don't > exist. I was shown, how it is done with mysql I think, the following select will solve your problem select first.id from first except second.id_first from second; > > select first.id,second.id_first > from first left join second on > id=id_first where id_first is NULL; > This query should never give any result, because you require id_first = id and id_first is null but if id_first is null then it's equal to nothing, and BTW it's also unequal to nothing. > but when I tried it in psql, it said, not implemented. Outer joins (left or right joins) are not implemented in PostgreSQL 7.0, but will come in 7.1. > > Antti Gerhard