IBM Books

SQL Reference


Expressions

   .-operator------------------------------------.
   V                                             |
>>----+-----+---+-function--------------------+--+-------------><
      +- + -+   +-(expression)----------------+
      '- - -'   +-constant--------------------+
                +-column-name-----------------+
                +-host-variable---------------+
                +-special-register------------+
                +-(scalar-fullselect)---------+
                |                  (1)        |
                +-labeled-duration------------+
                |                 (2)         |
                +-case-expression-------------+
                |                    (3)      |
                +-cast-specification----------+
                |                       (4)   |
                '-dereference-operation-------'
 
operator
 
             (5)
|---+-CONCAT------+---------------------------------------------|
    +- / ---------+
    +- * ---------+
    +- + ---------+
    '- - ---------'
 

Notes:

  1. See Labeled Durations for more information.

  2. See CASE Expressions for more information.

  3. See CAST Specifications for more information.

  4. See Dereference Operations for more information.

  5. || may be used as a synonym for CONCAT.

An expression specifies a value.

A scalar fullselect as supported in an expression is a fullselect, enclosed in parentheses, that returns a single row consisting of a single column value. If the fullselect does not return a row, the result of the expression is the null value. If the select list element is an expression that is simply a column name or a dereference operation, the result column name is based on the name of the column. See fullselect for more information.

Without Operators

If no operators are used, the result of the expression is the specified value.

Examples: SALARY :SALARY 'SALARY' MAX(SALARY)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]