Mimer SQL User's Manual TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


Setting Column Labels


Columns in the result table normally have the same name as the corresponding columns in the source table.

By using an AS clause after the column name in the SELECT statement, the column in the result table can be given an alternative name.

AS clauses can be used for as many columns as required. A label may be up to 128 characters long, and follows the same syntax rules as column names, see the Mimer SQL Reference Manual.

For example:
 SELECT  NAME AS HOTEL_NAME, CITY AS TOWN
 FROM    HOTEL;
Result:

 HOTEL_NAME
 TOWN
 LAPONIA
 STOCKHOLM
 SKYLINE
 UPPSALA
 ST. GEORGE
 STOCKHOLM
 Winston
 London
 WINSTON
 COPENHAGEN
 WINSTON
 GOTHENBURG

Labels are particularly useful in queries that retrieve computed values, where the result table column is otherwise unnamed, see Retrieving Computed Values.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL User's Manual TOC PREV NEXT INDEX