Re: Default column titles in a select...

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Cc: axel(at)pqrs(dot)de
Subject: Re: Default column titles in a select...
Date: 2003-02-19 15:10:40
Message-ID: 3E539E6F.A4841B91@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> When doing the following select statement:
> select * from a,b where a.objid=b.objid
> postgresql returns four columns labeled
> objid atext objid atext
> instead of what I expected:
> a.objid a.atext b.objid b.atext
>
> With the current result I'm unable to differentiate
> between the two 'atext' column. Is there any possibility
> to get column headers including the table name in the
> result ?
>
SELECT a.objid AS a_objid, a.atext AS a_atext, b.objid AS b_objid,
b.atext AS b_atext
FROM a, b WHERE a.objid=b.objid ;

Does this help? Probably not really.

Regards, Christoph

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-02-19 15:22:37 Re: once again, sorting with Unicode
Previous Message greg 2003-02-19 15:07:07 Re: Default column titles in a select...