Combining queries

Поиск
Список
Период
Сортировка
От Mark Kelly
Тема Combining queries
Дата
Msg-id 201102191325.48594.pgsql@wastedtimes.net
обсуждение исходный текст
Ответы Re: Combining queries  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice
Hi.

If I have two queries:

SELECT pub_id as id, email FROM publication WHERE email_accepted = TRUE;

and

SELECT contact_id as id, email FROM person WHERE email_accepted = TRUE;

is there any way I could combine these into a single query? I'd like to be
able to create a view of all email-able entities in the system.

Thanks,

Mark

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

Предыдущее
От: Michael Wood
Дата:
Сообщение: Re: Help loading data. Error code page 850
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Combining queries