Re: [SQL] [Q] Merging two queries? - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] [Q] Merging two queries?
Date
Msg-id 1604.945557287@sss.pgh.pa.us
Whole thread Raw
In response to [Q] Merging two queries?  (<angelko@saw.net>)
List pgsql-sql
That's an easy one: SELECT ... UNION SELECT ... does exactly what
you need.  You can leave DISTINCT off the individual SELECTs because
UNION implies a DISTINCT pass over the merged output.  (Use UNION ALL
if you don't want a final DISTINCT pass.)
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] making 'like' queries quicker
Next
From: Alex Guryanow
Date:
Subject: NOTICE: (transaction aborted): queries ignored until END