IFNULL

    Logical functions

    Syntax

    IFNULL( check_value, alt_value )
    

    Description

    Returns check_value if it's not NULL. Otherwise returns alt_value.

    Argument types:

    • check_valueAny
    • alt_valueAny

    Return type: Same type as (check_value, alt_value)

    Note

    Arguments (check_value, alt_value) must be of the same type.

    Examples

    IFNULL([Profit], 0)
    

    Data source support

    Materialized Dataset, ClickHouse 1.1, Microsoft SQL Server 2017 (14.0), MySQL 5.6, PostgreSQL 9.3.