Re: Altnerate Column Return Names

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thomas Swan <tswan(at)olemiss(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Altnerate Column Return Names
Date: 2000-07-08 00:09:02
Message-ID: Pine.LNX.4.21.0007072219470.587-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2000-07-08 00:09:12 Re: Search for underscore w/ LIKE
Previous Message Tom Lane 2000-07-07 21:56:12 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...