EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 371

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...
Chapter 8 SQL Functions
353
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.
Sybase Not supported by Adaptive Server Enterprise.
NOW function [Date and time]
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.
Sybase Not supported by Adaptive Server Enterprise.
NULLIF function [Miscellaneous]
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.
Usage
Standards and
compatibility
Function
Syntax
Examples
Standards and
compatibility
Function
Syntax
Parameters
Examples
Usage

Table of Contents

Related product manuals