An expression specifies a value. It can be a simple value, consisting of only a constant or a column name, or it can be more complex. When repeatedly using similar complex expressions, the usage of an SQL function may be considered to encapsulate a common expression. See CREATE FUNCTION (SQL Scalar, Table or Row) for more information.
.-operator-----------------------------------.
V |
>>----+-----+---+-function-------------------+--+--------------><
+- + -+ +-(expression)---------------+
'- - -' +-constant-------------------+
+-column-name----------------+
+-host-variable--------------+
+-special-register-----------+
| (1) |
+-(scalar-fullselect)--------+
| (2) |
+-labeled-duration-----------+
| (3) |
+-case-expression------------+
| (4) |
+-cast-specification---------+
| (5) |
+-dereference-operation------+
| (6) |
+-OLAP-function--------------+
| (7) |
+-method-invocation----------+
| (8) |
'-subtype-treatment----------'
operator
(9)
|---+-CONCAT------+---------------------------------------------|
+- / ---------+
+- * ---------+
+- + ---------+
'- - ---------'
Notes:
If no operators are used, the result of the expression is the specified value.
Examples: SALARY :SALARY 'SALARY' MAX(SALARY)