From: darcy@druid.net
To: raanders@altoplanos.net
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] can a column be aliased?
Date: Tue, 4 Aug 1998 07:38:08 -0400 (EDT)
Message-ID: <m0z3fPs-00006FC@druid.net> (raw)
In-Reply-To: <Pine.LNX.3.95.980803115341.26293A-100000@altoplanos.net>
Thus spake Roderick A. Anderson
> > Thus spake James Olin Oden
> > > I know this is probably a strange question, but can you give a column
> > > name an alias? The reason I ask is because I have recently realized I
> >
> > SELECT table1.oid AS custnum, table2.oid AS salesman FROM ...
> >
>
> Hot as flame bait, but is the AS a SQL92 standard? Coming from an Oracle
Yes it is.
> background I used
>
> select table1.oid custnum,
> table2.oid salesman
> from ...
This is accepted by the standard as well but doesn't seem to be accepted
by PostgreSQL. Does Oracle accept AS?
<select list> ::=
<asterisk>
| <select sublist> [ { <comma> <select sublist> }... ]
<select sublist> ::=
<derived column>
| <qualifier> <period> <asterisk>
<derived column> ::= <value expression> [ <as clause> ]
<as clause> ::= [ AS ] <column name>
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: darcy@druid.net, raanders@altoplanos.net
Subject: Re: [SQL] can a column be aliased?
In-Reply-To: <m0z3fPs-00006FC@druid.net>
References: <Pine.LNX.3.95.980803115341.26293A-100000@altoplanos.net> <m0z3fPs-00006FC@druid.net>
* 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