A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/sql-reference/functions/nullif below:

Website Navigation


NULLIF | Snowflake Documentation

NULLIF

Returns NULL if expr1 is equal to expr2, otherwise returns expr1.

Syntax
NULLIF( <expr1> , <expr2> )

Copy

Arguments
expr1

Any general expression of any data type.

expr2

Any general expression that evaluates to the same data type as expr1.

Returns

The data type of the returned value is the data type of expr1.

Collation details Examples
SELECT a, b, NULLIF(a,b) FROM i;

--------+--------+-------------+
   a    |   b    | nullif(a,b) |
--------+--------+-------------+
 0      | 0      | [NULL]      |
 0      | 1      | 0           |
 0      | [NULL] | 0           |
 1      | 0      | 1           |
 1      | 1      | [NULL]      |
 1      | [NULL] | 1           |
 [NULL] | 0      | [NULL]      |
 [NULL] | 1      | [NULL]      |
 [NULL] | [NULL] | [NULL]      |
--------+--------+-------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4