Re: SELECT from multiple tables (not join though) - Mailing list pgsql-general

From Madison Kelly
Subject Re: SELECT from multiple tables (not join though)
Date
Msg-id 41E2C872.3090400@alteeve.com
Whole thread Raw
In response to Re: SELECT from multiple tables (not join though)  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: SELECT from multiple tables (not join though)
Re: SELECT from multiple tables (not join though)
Re: SELECT from multiple tables (not join though)
List pgsql-general
Bruno Wolff III wrote:
> On Mon, Jan 10, 2005 at 12:47:53 -0500,
>   Madison Kelly <linux@alteeve.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.

^.^; Can you point me to docs that will help me learn how to do that?
Thanks! Or rather, do you mean add a column to the table with an ID for
the table that I select beside the file_name? If so, that is what I am
planning to do if I can't find a smoother way to do it.

Thanks!!

Madison

pgsql-general by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Function for retreiving datatype
Next
From: Derik Barclay
Date:
Subject: Re: SELECT from multiple tables (not join though)