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

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: how to have 2 select creteria on one column?
Дата
Msg-id 43230A68.4000304@archonet.com
обсуждение исходный текст
Ответ на how to have 2 select creteria on one column?  (Michael Hoeller <MichaelHoeller@t-online.de>)
Список 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 по дате отправления:

Предыдущее
От: Michael Hoeller
Дата:
Сообщение: how to have 2 select creteria on one column?
Следующее
От: Michael Hoeller
Дата:
Сообщение: how to update with a join?