Progress
SQL-92
Guide and Reference


IFNULL Function

Returns value if expr is null. If expr is not null, IFNULL returns expr.

SYNTAX

IFNULL( expr, value) 

EXAMPLE

This example illustrates the IFNULL function. The SELECT statement returns three rows with a NULL value in column C1, and two non-NULL values:

SELECT C1, IFNULL(C1, 9999) FROM TEMP ORDER BY C1; 
 
C1    IFNULL(C1,9999)
--    ----------------
      9999
      9999
      9999
1     1
3     3 

NOTE

COMPATIBILITY

ODBC Compatible


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095