Sybase Adaptive Server Anywhere Reference page 371

Table of Contents

Advertisement

Usage
Standards and
compatibility
NOW function [Date and time]
Function
Syntax
Examples
Standards and
compatibility
NULLIF function [Miscellaneous]
Function
Syntax
Parameters
Examples
Usage
NEXT_DATABASE can be used to enumerate the databases running on a
database server. To get the first database pass NULL; to get each subsequent
database, pass the previous return value. The function returns NULL when
there are no more databases.
SQL/92
Transact-SQL extension.
Not supported by Adaptive Server Enterprise.
Sybase
Returns the current date and time. This is the historical syntax for
CURRENT TIMESTAMP.
NOW ( * )
The following statement returns the current date and time.
SELECT NOW(*)
SQL/92
Vendor extension.
Not supported by Adaptive Server Enterprise.
Sybase
To provide an abbreviated CASE expression by comparing expressions.
NULLIF ( expression-1 , expression-2 )
expression-1
An expression to be compared.
expression-2
An expression to be compared.
The following statement returns a:
SELECT NULLIF( 'a', 'b' )
The following statement returns NULL.
SELECT NULLIF( 'a', 'a' )
NULLIF compares the values of the two expressions.
If the first expression equals the second expression, NULLIF returns NULL.
If the first expression does not equal the second expression, or if the second
expression is NULL, NULLIF returns the first expression.
The NULLIF function provides a short way to write some CASE
expressions.
Chapter 8 SQL Functions
353

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents