Command SELECT - SQL SELECT Clause Foundation

Defines the columns in the query result of an SQL SELECT command.

   <cFieldName> [AS <cAliasName>] 
   | <cAliasName> -> <cFieldName> [AS <cAliasName>]
   | (<Expression>) [AS <cAliasName>]
   | (<SubSelectExpr>) [AS <cAliasName>]
<cAliasName> -> <cFieldName> [AS <cAliasName>]
<Expression> [AS <cAliasName>]
(SubSelectExpr) [AS <cAliasName>]
<SubSelectExpression> specifies an SQL SELECT statement whose result set defines the columns to be included in the query result. Any type of SQL SELECT statement can be used with this parameter, including statements using joins and filters. However, the INTO and EVAL clauses can not be used in subselects.

Specifies the name of a column in the query result. The column name can be specified as follows:

As the name of a field in a table specified in the FROM clause. Note that columns names must be unique within the column specification. If the same field is contained in more than one table, the field name must be prefixed with the name of the table. For example, SELECT cust->cid,order->date FROM customer AS cust,order WHERE cust->cid=order->cid

As a constant indicating that the same constant value should be displayed in all rows in the result set.

As an expression returning the name of a user-defined function.

Optionally, an alias name may be defined for the column using the AS <cAliasName> option. The alias name defines the caption to be used for the column in the query result. This option is useful for assigning meaningful names to columns specified as expressions or fields containing functions. <cAliasName> can be any character expression, but it cannot contain characters that are not permitted in table field names such spaces, for example.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.