Re: how to have 2 select creteria on one column? - Mailing list pgsql-sql

From Richard Huxton
Subject Re: how to have 2 select creteria on one column?
Date
Msg-id 43230A68.4000304@archonet.com
Whole thread Raw
In response to how to have 2 select creteria on one column?  (Michael Hoeller <MichaelHoeller@t-online.de>)
List 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


pgsql-sql by date:

Previous
From: Michael Hoeller
Date:
Subject: how to have 2 select creteria on one column?
Next
From: Michael Hoeller
Date:
Subject: how to update with a join?