|
|
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, Chapter 5, SQL Identifiers.
For example:
SELECT format AS format_name, category_id FROM formats;Returns:
FORMAT_NAME Audio CD Cassette DVD Audio Vinyl Audio Cassette Audio CD Hardcover Paperback DVD Video VideoLabels 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 |
|
|