Skip site navigation (1) Skip section navigation (2)

Combining queries

From: Mark Kelly <pgsql(at)wastedtimes(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Combining queries
Date: 2011-02-19 13:25:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

If I have two queries:

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


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.




pgsql-novice by date

Next:From: Sean DavisDate: 2011-02-19 13:47:15
Subject: Re: Combining queries
Previous:From: Michael WoodDate: 2011-02-19 12:48:16
Subject: Re: Help loading data. Error code page 850

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group