Re: Simplyfying many equals in a join

Поиск
Список
Период
Сортировка
От cnliou
Тема Re: Simplyfying many equals in a join
Дата
Msg-id 1077788242.37142.cnliou@so-net.net.tw
обсуждение исходный текст
Ответ на Simplyfying many equals in a join  (Randall Skelton <skelton@brutus.uwaterloo.ca>)
Ответы Re: Simplyfying many equals in a join
Список pgsql-general
>Is there a shorthand notation when performing a multi-table join and one
>column is to be equaled in all tables?

Is this you are looking for?

SELECT t1.c7,t2.c6
FROM t1,t2
USING (c1,c2,c3)
WHERE t1.c4='2004-2-28' AND t2.c5='xyz'

performs the same as

SELECT t1.c7,t2.c6
FROM t1,t2
WHERE t1.c1=t2.c1 and t1.c2=t2.c2 and t1.c3=t2.c3
and t1.c4='2004-2-28' AND t2.c5='xyz'

CN

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

Предыдущее
От: Shachar Shemesh
Дата:
Сообщение: Re: Windows Library for libpq
Следующее
От: "Jennifer Lee"
Дата:
Сообщение: help using arrays in a function