Search Postgresql Archives

Re: How to fetch rows with multiple values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux