6.9.1 Decision rules for derived column names in query specifications
In query specifications, derived column names are determined according to the following rules.
-
In the case of a FROM clause
The derived column names will be the column names of the table specified in the table reference.
Example
SELECT "C1","C2" FROM "T1"
In the example above, the derived column names are the names of the columns of table T1.
-
In the case of a GROUP BY clause
The derived column names will be the names of the grouping columns.
Example
SELECT "C1","GC2",SUM("C3") FROM "T1" GROUP BY "C1",SUBSTR("C2",5,2) AS "GC2"
In the example above, the derived column names are "C1" and "GC2".