Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL elements » Expressions in UltraLite

 

IF expressions

Sets a search condition to return a specific subset of data.

Syntax 1
IF search-condition
THEN expression1
[ ELSE expression2 ]
ENDIF
Remarks

For compatibility reasons, this expression can end in either ENDIF or END IF.

This expression returns the following:

  • If search-condition is TRUE, the IF expression returns expression1.

  • If search-condition is FALSE and an ELSE clause is specified, the IF expression returns expression2.

  • If search-condition is FALSE, and there is no expression2, the IF expression returns NULL.

  • If search-condition is UNKNOWN, the IF expression returns NULL.

See also