Re: Alternative to INTERSECT

Поиск
Список
Период
Сортировка
От Rodrigo De León
Тема Re: Alternative to INTERSECT
Дата
Msg-id a55915760707311330g7e977a63wbb616023d5d2563a@mail.gmail.com
обсуждение исходный текст
Ответ на Alternative to INTERSECT  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-sql
On 7/31/07, Andreas Joseph Krogh <andreak@officenet.no> wrote:
> Is there a way to make this more efficient with another construct, or
> INTERSECT the only way to accomplish the desired result?

SELECT f1.ID FROM TEST f1 JOIN TEST f2 ON f1.ID = f2.ID      JOIN TEST f3 ON f2.ID = f3.IDWHERE f1.FIELD = 'firstname'
ANDf1.VALUE LIKE 'andrea%'  AND f2.FIELD = 'firstname'  AND f2.VALUE LIKE 'jose%'  AND f3.FIELD = 'lastname'  AND
f3.VALUELIKE 'kro%';
 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Alternative to INTERSECT
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Alternative to INTERSECT