Re: SELECT from multiple tables (not join though)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT from multiple tables (not join though)
Date: 2005-01-10 18:26:08
Message-ID: 20050110182608.GA7337@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 10, 2005 at 12:47:53 -0500,
Madison Kelly <linux(at)alteeve(dot)com> wrote:
>
> The trick now is I need to know which table each result came from. I can
> add another column and record the table number and SELECT that at the
> same time but before I do I was wondering if I can do this more
> efficiently or elegantly.

You can add a constant to the select list in each of the subselects
that indicates which table is being used.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brendan Jurd 2005-01-10 18:26:59 Re: Function for retreiving datatype
Previous Message Madison Kelly 2005-01-10 18:24:50 Re: SELECT from multiple tables (not join though)