Re: Default column titles in a select... - Mailing list pgsql-sql

From Christoph Haller
Subject Re: Default column titles in a select...
Date
Msg-id 3E539E6F.A4841B91@rodos.fzk.de
Whole thread Raw
In response to Default column titles in a select...  (Axel Schlueter <axel@pqrs.de>)
List 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_atextFROM a, b WHERE a.objid=b.objid ;

Does this help? Probably not really.

Regards, Christoph




pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Default column titles in a select...
Next
From: Tom Lane
Date:
Subject: Re: once again, sorting with Unicode