Re: Select clause in JOIN statement

Поиск
Список
Период
Сортировка
От Luca Vernini
Тема Re: Select clause in JOIN statement
Дата
Msg-id CAHZ=uVCVxByi0zq_C9rN_4Vg9tzRmiwZ9YvvuesdJ4Sx-dOn7g@mail.gmail.com
обсуждение исходный текст
Ответ на Select clause in JOIN statement  (JORGE MALDONADO <jorgemal1960@gmail.com>)
Ответы Re: Select clause in JOIN statement  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-sql
It works.
Also consider views.

Just used this on a my db:

SELECT * FROM tblcus_customer
INNER JOIN
( SELECT * FROM tblcus_customer_status WHERE status_id > 0) AS b
ON tblcus_customer.status = b.status_id


You can even join with a function result.

Regards,

Luca.

2013/6/14 JORGE MALDONADO <jorgemal1960@gmail.com>:
> Is it valid to specify a SELECT statement as part of a JOIN clause?
>
> For example:
>
> SELECT table1.f1, table1.f2 FROM table1
> INNER JOIN
> (SELECT table2.f1, table2.f2 FROM table2) table_aux ON table1.f1 =
> table_aux.f1
>
> Respectfully,
> Jorge Maldonado



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

Предыдущее
От: JORGE MALDONADO
Дата:
Сообщение: Select clause in JOIN statement
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Select clause in JOIN statement