An expression is a statement that can be evaluated to return values.

expression:case-expression|constant| [correlation-name.]column-name|-expression|expressionoperatorexpression|(expression)|function-name(expression, ...)|if-expression|specialvalue|(subquery)|variable-name

case-expression:CASEexpressionWHENexpressionTHENexpression,... [ELSEexpression]END

alternativeformofcase-expression:CASEWHENsearch-conditionTHENexpression, ... [ELSEexpression]END

constant:integer|number|string|host-variable

special-value:CURRENT{DATE|TIME|TIMESTAMP} |NULL|SQLCODE|SQLSTATE|USER

if-expression:IFconditionTHENexpression[ELSEexpression]ENDIF

operator: {+|-|*|/||||%}

Expressions are used in many different places.

Expressions are formed from several different kinds of elements. These are discussed in the sections on functions and variables. See SQL functions, and Variables.

You must be connected to the database in order evaluate expressions.

None.

- Constants in expressions
- Special values
- Column names in expressions
- SQL functions
- Subqueries in expressions
- Search conditions
- SQL data types
- Variables
- CASE expressions

- See the separate descriptions of each class of expression, in the following sections.

Constants in expressions

Column names in expressions

Subqueries in expressions

IF expressions

CASE expressions

Regular expressions

Compatibility of expressions

Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |