Re: [INTERFACES] Tables names from query

From: Bob VonMoss <bvonmoss(at)idm(dot)com>
To: philip(dot)shiels(at)jrc(dot)it
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Tables names from query
Date: 1999-02-22 15:47:33
Message-ID: 36D17C14.4384F7D8@idm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Philip Shiels wrote:

> SELECT x.y, z.y from x, y where x.key = z.key
>
> The problem with the above is that I get back 2 fields called 'y' and have no
> way of knowing from which tables they've come from.

Do something like this:

SELECT x.y, z.y AS z_y from x, z where x.key = z.key;

> Is there is a way of identifying the originating tables ?

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-02-22 15:49:33 Re: [INTERFACES] Tables names from query
Previous Message Michael Contzen 1999-02-22 15:00:11 What is SQLForeignKeys in ODBC-Driver?