Re: UNION help

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Robert James" <srobertjames(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: UNION help
Date: 2007-05-18 23:06:08
Message-ID: D425483C2C5C9F49B5B7A41F894415470100068F@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SELECT '1st Query' as whichone, col1, col2, col3 from table1

UNION

SELECT '2ND Query' as whichone, col1, col2, col3 from table2

________________________________

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Robert James
Sent: Thursday, May 17, 2007 12:11 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] UNION help

Is there anyway to tell if the records in a union came from the 1st
query or the second?
Can I modify the individual queries to let me know this?

In response to

  • UNION help at 2007-05-17 19:11:15 from Robert James

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2007-05-19 00:03:30 Re: Data replication through disk replication
Previous Message Shane 2007-05-18 22:19:27 Database corruption