pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Stone <nick@harelane.com>
To: 'nori' <kodmasin@gmail.com>
To: 'Mischa Sandberg' <mischa.sandberg@telus.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to alias table columns in result?
Date: Thu, 11 Aug 2005 10:56:54 +0100
Message-ID: <20050811095451.B475F252AE9@smtp.nildram.co.uk> (raw)
In-Reply-To: <174550350508110248d4fc071@mail.gmail.com>

Yes - just alias the columns you need to alias

Nick 

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of nori
Sent: 11 August 2005 10:48
To: Mischa Sandberg
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] How to alias table columns in result?

Thanks

Sorry, my question was missing one important detail. My tables have quite a
lot columns (which unfortunately have same names in both
tables) so is it possible to do same as below but without specifying alias
for each column. Now my queries are long and they do not look nice.

boris

On 8/11/05, Mischa Sandberg <mischa.sandberg@telus.net> wrote:
> SELECT d.name as "d.name",
>        d.index as "d.index",
>        c.name as "c.name",
>        ...

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend






view thread (6+ messages)  latest in thread

Message-ID: <20050811095451.B475F252AE9@smtp.nildram.co.uk>
Permalink:  ../20050811095451.B475F252AE9@smtp.nildram.co.uk/
Also on:    postgresql.org/message-id/20050811095451.B475F252AE9@smtp.nildram.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nick@harelane.com, kodmasin@gmail.com, mischa.sandberg@telus.net
  Subject: Re: How to alias table columns in result?
  In-Reply-To: <20050811095451.B475F252AE9@smtp.nildram.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox