Contents Index Operator precedence Constants in expressions

ASA SQL Reference
  SQL Language Elements

Expressions


Syntax 

expression:
 case-expression
constant
| [correlation-name.]column-name
| - expression
expression operator expression
| ( expression )
function-name ( expression, ... )
if-expression
special value
| ( subquery )
variable-name

Parameters 

case-expression:
CASE expression
WHEN expression
THEN expression,...
ELSE expression ]
END

alternative form of case-expression:
CASE
WHEN search-condition
THEN expression,...
ELSE expression ]
END

constant:
 integer  | number  | string | host-variable

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

if-expression:
IF condition
THEN expression
ELSE expression ]
ENDIF

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

Usage 

Anywhere.

Authorization 

Must be connected to the database.

Side effects 

None.

Description 

Expressions are formed from several different kinds of elements. These are discussed in the following sections.

For information on functions, see SQL Functions. For information on variables, see Variables.

See also 

Constants in expressions

Special values

Column names in expressions

SQL Functions

Subqueries in expressions

Search conditions

SQL Data Types

Variables

CASE expressions

Standards and compatibility 

Constants in expressions
Column names in expressions
Subqueries in expressions
IF expressions
CASE expressions
Compatibility of expressions

Contents Index Operator precedence Constants in expressions