An expression specifies a value. Following is the syntax diagram for an expression.
┌─ operator ───────────────────────┐ ►►─▼─┬─────┬─┬─ function ───────────┬─┴───────────────────────────────────────►◄ ├─ - ─┤ ├─ (expression) ───────┤ └─ + ─┘ ├─ CASEexpression ─────┤ ├─ COALESCEexpression ─┤ ├─ NULLIFexpression ───┤ ├─ CASTexpression ─────┤ ├─ literal ────────────┤ ├─ column-name ────────┤ ├─ host-variable ──────┤ ├─ special-register ───┤ ├─ labeled-duration ───┤ ├─ SQL-parameter ──────┤ └─ SQL-variable ───────┘
Expansion of Where operator is as follows
├──┬─ * ──┬────────────────────────────────────────────────────────────────────┤ ├─ \ ─┤ ├─ - ──┤ └─ + ──┘
The special-register and labeled-duration are CA Datacom/DB extensions. See Special Registers and Labeled Duration.
Specify a function. For more information about functions, see Functions.
Specify an expression.
For information about CASE expressions, see CASE Expressions.
For information about COALESCE expressions, see COALESCE and NULLIF Expressions.
For information about NULLIF expressions, see COALESCE and NULLIF Expressions.
For information about CAST expressions, see CAST Expressions.
Specify a literal. If the expression is numeric, the literal must be numeric. For more information on literals, see Literals.
Specify the name of a column in a table or view. If the expression is an arithmetic expression, the column must be of a numeric data type.
Specify a host-variable. A host-variable in an expression must identify a variable described in the program under the rules for declaring host-variables. For more information on host-variables, see Host Variables.
A special register can be used wherever an expression can be used, except that special registers may not be used in the search condition of a CHECK constraint. See Special Registers.
A labeled duration can only be used in an expression that involves a date or time value. See Labeled Duration.
Inside SQL Procedures, an SQL-parameter can be used anywhere expressions are allowed. Except in the CALL and EXECUTE statements, an SQL-parameter cannot be used outside of procedures. For more information, see SQL Parameters.
Inside compound statements, an SQL-variable can be used anywhere expressions are allowed, but an SQL-variable cannot be used outside of a compound statement. For more information, see SQL Variables.
|
Copyright © 2014 CA.
All rights reserved.
|
|