Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: Altnerate Column Return Names - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Altnerate Column Return Names
Date
Msg-id [email protected]
Whole thread Raw
In response to Altnerate Column Return Names  (Thomas Swan <[email protected]>)
List pgsql-sql
Thomas Swan writes:

> If I do a select * from table1, table2 where table1.id = table2.id I 
> normally get two columns returned with a column identifier of id.

>   id | name | data | id | name | data
> ----+------+------+----+------+------

> Is there anyway to get the result to return
> 
>   table1.id | table1.name | table1.data | table2.id | ,,,
> -----------+-------------+-------------+-----------+- ...

select table1.id as "whatever you want", table1.name as "whatever you
want", table1.data as "something", ...

You get the idea.


-- 
Peter Eisentraut                  Sernanders väg 10:115
[email protected]                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-sql by date:

Previous
From: Antoine Reid
Date:
Subject: Re: confused by select.
Next
From: Peter Eisentraut
Date:
Subject: Re: Search for underscore w/ LIKE