Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1B1A09F95A7 for ; Mon, 13 Aug 2007 15:07:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 88687-01-9 for ; Mon, 13 Aug 2007 15:07:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id F2A1F9F9ABA for ; Mon, 13 Aug 2007 15:07:53 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Mon, 13 Aug 2007 13:07:52 -0500 Message-Id: <46C0579F.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Mon, 13 Aug 2007 13:07:43 -0500 From: "Kevin Grittner" To: "olivier boissard" , Subject: Re: except command References: <46C099F6.8050002@cerene.fr> In-Reply-To: <46C099F6.8050002@cerene.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/133 X-Sequence-Number: 26464 >>> On Mon, Aug 13, 2007 at 12:50 PM, in message <46C099F6.8050002@cerene.f= r>, olivier boissard wrote:=20 > I tried to use the except command in postgresql 8.1 > I don't understand as it works > When I read doc , I understand that it was like a difference betwwen = two=20 > queries That isn't how I read it: =20 "The EXCEPT operator returns the rows that are in the first result set but not in the second." =20 ( http://www.postgresql.org/docs/8.1/interactive/sql-select.html ) =20 Are you seeing something different? =20 This gets me all the eye color codes that don't start with the letter 'B'. (There are of course easier ways to get that...) =20 bigbird=3D> select * from "EyeColorCode" except select * from "EyeColorCode= " where "eyeColorCode" like 'B%'; eyeColorCode | descr | isActive | dotEyeColorCode --------------+-----------------+----------+----------------- GRN | Green | t | GRN GRY | Gray | t | GRY HAZ | Hazel | t | HAZ MAR | Maroon | t | MAR MUL | Multicolored | t | DIC PNK | Pink | t | PNK XXX | Unknown | t | UNK (7 rows) =20 -Kevin =20