Altnerate Column Return Names

From: Thomas Swan <tswan(at)olemiss(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Altnerate Column Return Names
Date: 2000-07-07 13:46:52
Message-ID: 4.3.2.7.2.20000707083729.01ff2f08@sunset.backbone.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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.

Such as

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

Is there anyway to get the result to return

table1.id | table1.name | table1.data | table2.id | ,,,
-----------+-------------+-------------+-----------+- ...

It seems awkward, however the only way I've been able to work around this
is to use column names prefixed with the table name.

One of my projects is using PHP and I"m sure that the hash table they
create to select rows is determined from the column names returned from a
query.

Thanks,
Thomas

... I feel like I ask some weird questions ...
-
- Thomas Swan
- ________________________________________
- Graduate Student - Computer Science
- The University of Mississippi
-
- "People can be sorted into two fundamental groups,
- those that divide people into two groups and
- those that don't."

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Bitmead 2000-07-07 15:35:02 Re: [HACKERS] Re: [SQL] MAX() of 0 records.
Previous Message eisentrp 2000-07-07 13:14:07 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...