Re: query that needs two nested queries, is this the best
В списке pgsql-general по дате отправления:
| От | Richard Huxton |
|---|---|
| Тема | Re: query that needs two nested queries, is this the best |
| Дата | |
| Msg-id | 4450F8A4.8000802@archonet.com обсуждение исходный текст |
| Ответ на | query that needs two nested queries, is this the best way? (Mark Harrison <mh@pixar.com>) |
| Ответы |
Re: query that needs two nested queries, is this the best
|
| Список | pgsql-general |
Mark Harrison wrote: > > ### QUERY 3: combine the two statements above by using two subselects > > scratch1=# select id from p4_versions where > versionof=(select id from p4_files where p4path like > '%/date.txt') > and > version=(select headver from p4_files where p4path like > '%/date.txt'); This won't work if your LIKE matches more than one row anyway. Try something like: SELECT id FROM p4_versions WHERE (versionof, version) IN (SELECT id,headver FROM p4_files WHERE ...) -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера