File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
super-sql/functions/generics Expand file tree Collapse file tree 2 files changed +40
-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 the value of ` val1 ` is
15+ returned.
16+
17+ ### Examples
18+
19+ ---
20+
21+ ``` mdtest-spq
22+ # spq
23+ nullif(1, 1)
24+ # input
25+
26+ # expected output
27+ null::int64
28+ ```
29+
30+ ---
31+
32+ ``` mdtest-spq
33+ # spq
34+ nullif("foo", "bar")
35+ # input
36+
37+ # expected output
38+ "foo"
39+ ```
You can’t perform that action at this time.
0 commit comments