File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
super-sql/functions/generics Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 123123 - [ has] ( super-sql/functions/generics/has.md )
124124 - [ len] ( super-sql/functions/generics/len.md )
125125 - [ map] ( super-sql/functions/generics/map.md )
126+ - [ nullif] ( super-sql/functions/generics/nullif.md )
126127 - [ under] ( super-sql/functions/generics/under.md )
127128 - [ Errors] ( super-sql/functions/errors/intro.md )
128129 - [ error] ( super-sql/functions/errors/error.md )
Original file line number Diff line number Diff line change 1+ ### Function
2+
3+ &emsp ; ** nullif** &mdash ; returns a null value if values are equal
4+
5+ ### Synopsis
6+
7+ ```
8+ nullif(val1: any, val2: any) -> any
9+ ```
10+
11+ ### Description
12+
13+ The ` nullif ` function returns a ` null ` value if its first argument ` val1 ` is
14+ equal to its second argument ` val2 ` , otherwise it returns ` val1 ` .
15+
16+ ### Examples
17+
18+ ---
19+
20+ ``` mdtest-spq
21+ # spq
22+ nullif(1, 1)
23+ # input
24+
25+ # expected output
26+ null::int64
27+ ```
28+
29+ ---
30+
31+ ``` mdtest-spq
32+ # spq
33+ nullif("foo", "bar")
34+ # input
35+
36+ # expected output
37+ "foo"
38+ ```
You can’t perform that action at this time.
0 commit comments