Re: How to fetch rows with multiple values

Поиск
Список
Период
Сортировка
Искать
От
Richard Huxton
Тема
Re: How to fetch rows with multiple values
Дата
Msg-id
43D10BC6.90402@archonet.com
Ответ на
Список
Дерево обсуждения
How to fetch rows with multiple values Sebastjan Trepca <trepca@gmail.com>
Re: How to fetch rows with multiple values Michael Glaesemann <grzm@myrealbox.com>
Re: How to fetch rows with multiple values Sebastjan Trepca <trepca@gmail.com>
Re: How to fetch rows with multiple values Keary Suska <hierophant@pcisys.net>
Re: How to fetch rows with multiple values Richard Huxton <dev@archonet.com>
Re: How to fetch rows with multiple values Sebastjan Trepca <trepca@gmail.com>
Re: How to fetch rows with multiple values Keary Suska <hierophant@pcisys.net>
Keary Suska wrote:
>> Data looks something like this:
>>
>> "john"     1 
>> "peter"    1

> 
> Maybe I'm a little thick this morning but can't you just do:
> 
> SELECT "ID" from customer_mapping WHERE "Name"='john' OR "Name"='peter' OR
> "Name"='george' ORDER BY "ID" DESC

Not quite. He's after ID that have *both* names, so ID=1 above because 
it has "john" AND "peter".

-- 
   Richard Huxton
   Archonet Ltd
В списке pgsql-general по дате отправления
От: Matthew T. O'Connor
Дата:
От: Csaba Nagy
Дата:
FAQ