Does PostgreSQL support Constant Expression (Alias Name)?

From: Raymond Chui <raymond(dot)chui(at)noaa(dot)gov>
To: pgsql-general(at)postgresql(dot)org
Subject: Does PostgreSQL support Constant Expression (Alias Name)?
Date: 2001-03-02 14:30:14
Message-ID: 3A9FAE75.BA22CF06@noaa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If a table has columns fname, lname.
I want to do query like

SELECT fname "First Name", lname "Last Name" FROM aTable;

This SELECT statement is fine in Oracle, Sybase and Informix.
But I get an error message in PostgreSQL

Because I want the output like

First Name | Last Name
--------------------------
fn | ln

instead default like

fname | lname
---------------
fn | ln

What is the correct way doing this in PostgreSQL?
Thank you very much in advance!

--Raymond

Attachment Content-Type Size
raymond.chui.vcf text/x-vcard 414 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin A. Marques 2001-03-02 14:30:45 Re: platforms
Previous Message Laurent 2001-03-02 14:29:54 import large objects with libpq