Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

[no subject]



    "The column name option is designed to be used when column
    names are used in the SQL query that generated the result set.
    For columns that are NOT explicitly named in the query, it
    is best to use column numbers."

The only way to "name" a SQL query column is with AS.  There's
corroboration in DatabaseMetaData:

public boolean supportsColumnAliasing() throws SQLException

    Retrieves whether this database supports column aliasing.
    If so, the SQL AS clause can be used to provide names for
    computed columns or to provide alias names for columns as
    required.

In both cases, "names" and not "labels".

I too wish the docs were more definitive on this.  Googling on
the topic reveals that there has been confusion on it for some
time.  Anyone know someone at Sun who could confirm the true
intent?

Mike





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group