On Sat, Feb 19, 2011 at 8:25 AM, Mark Kelly <pgsql(at)wastedtimes(dot)net> wrote:
> 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.
Take a look at sql UNION--this is not postgresql specific.
In response to
pgsql-novice by date
|Next:||From: Thomas Kellerer||Date: 2011-02-19 16:13:34|
|Subject: Re: Updating a table field with a consecutive number|
|Previous:||From: Mark Kelly||Date: 2011-02-19 13:25:48|
|Subject: Combining queries|