A column select expression is a select expression that specifies a one-column result table in one row and can be nested within predicates and (if they specify a single value) value expressions. Column select expressions cannot specify a list of select items. You can only specify one value in a select list. Column select expressions are also called scalar expressions. SQL accepts column select expressions as arguments to IN and quantified predicates, and more generally as value expressions. o As arguments to IN and quantified predicates, column select expressions specify a collection of values to which SQL compares a value expression. Therefore, column select expressions as arguments to those predicates can return one or more values. o As a type of value expression, column select expressions specify a single value. Therefore, a column select expression used as a value expression should not return more than one value. If it does, SQL generates the following error: %RDB-E-MULTIPLE_MATCH, record selection criteria should identify only one record; more than one record found If a column select expression used as a value expression returns zero rows, SQL evaluates the value expression as null. The data type of a column select expression used as a value expression is the same as the data type of the column select expression's select item.
1 – Environment
You can use column select expressions in interactive SQL or in host language programs.
2 – Format
(B)0[m[1mcol-select-expr = [m [1m [m [1mqqq> select-expr qqqqqqq> [m [1m [m (B)0[m[1mselect-expr = [m [1m [m [1m [m [1m [m [1mqwqwq> select-clause qqqqqqqqqqqqwqwqqqqqqk[m [1m [m [1m x tq> ( select-expr ) qqqqqqqqqqqu x [m [1mx[m [1m [m [1m [m [1m x mq> [1;4mTABLE[m[1m table-ref qqqqqqqqqqj x x [m [1m [m [1m mqqqqqq select-merge-clause <qqqqqqqj [m [1m x[m [1m lqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqqj[m [1m [m [1mmqwqqqqqqqqqqqqqqqqqqqqwqqwqqqqqqqqqqqqqqqqqqwqqwqqqqqqqqqqqqqqqqqqqqwq>[m [1m [m [1m mq> order-by-clause qj[m [1mmq> offset-clause qj [m [1mmq> limit-to-clause qj[m
3 – Arguments
3.1 – select-expr
A column select expression is a select expression specifying only one value in the select list. See Select_Expressions for more information.