Re: how to have 2 select creteria on one column?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Michael Hoeller <MichaelHoeller(at)t-online(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to have 2 select creteria on one column?
Date: 2005-09-10 16:31:36
Message-ID: 43230A68.4000304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Michael Hoeller wrote:
> Hello,
>
> I would like to select every row which has got in the column CODE a "k"
> but I want to exclude every "kV" -- may be it is due to the fact that
> it is Saturday and I work too long I don't get it.. I tried a
> subselect, union but I struggle with the two select creteria on one
> column.

SELECT * FROM my_table
WHERE code = 'k'
AND code <> 'kV'
;

HTH
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Hoeller 2005-09-10 16:41:17 Fwd: how to have 2 select creteria on one column? SOLVED
Previous Message Michael Hoeller 2005-09-10 15:45:50 how to have 2 select creteria on one column?