Expressions are formed from several different kinds of elements, such as constants, column names, SQL operators, and subqueries.
expression: case-expression | constant | [ correlation-name. ] column-name [ java-ref ] | - expression | expression operator expression | ( expression ) | function-name ( expression, … ) | if-expression | [ java-package-name. ] java-class-name java-ref | ( subquery ) | variable-name [ java-ref ]
case-expression: { CASE search-condition ... WHEN expression THEN expression [ , … ] ... [ ELSE expression ] END | CASE ... WHEN search-condition THEN expression [ , … ] ... [ ELSE expression ] END }
constant: { integer | number | 'string' | special-constant | host-variable }
special-constant: { CURRENT { DATE | TIME | TIMESTAMP | USER } | LAST USER | NULL | SQLCODE | SQLSTATE }
if-expression: IF condition ... THEN expression ... [ ELSE expression ] ENDIF
java-ref: { .field-name [ java-ref ] | >> field-name [ java-ref ] | .method-name ( [ expression ] [ , … ] ) [ java-ref ] | >> method-name ( [ expression ] [ , … ] ) [ java-ref ] }
operator: { + | - | * | / | || | % }