EasyManua.ls Logo

Sybase Adaptive Server Anywhere - If Expressions

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Expressions
232
address
"date hired"
"salary"."date paid"
$ For more information on identifiers, see "Identifiers" on page 223.
Subqueries in expressions
A subquery is a SELECT statement enclosed in parentheses. The SELECT
statement must contain one and only one select list item. When used as an
expression, a subquery is generally allowed to return only one value.
A subquery can be used anywhere that a column name can be used. For
example, a subquery can be used in the select list of another SELECT
statement.
$ For other uses of subqueries, see "Subqueries in search conditions" on
page 240.
IF expressions
The syntax of the IF expression is as follows:
IF
condition
THEN
expression1
[ ELSE
expression2
]
ENDIF
This expression returns the following:
If condition is TRUE, the IF expression returns expression1.
If condition is FALSE, the IF expression returns expression2.
If condition is FALSE, and there is no expression2, the IF expression
returns NULL.
If condition is NULL, the IF expression returns NULL.
$ For more information about TRUE, FALSE and UNKNOWN
conditions, see "NULL value" on page 260, and "Search conditions" on
page 239.

Table of Contents

Related product manuals