chickadee » sql-null » sql-or

(sql-or test-1 ...)syntax

The TEST expressions are evaluated from left to right, and the value of the first expression that evaluates to a value, other than SQL NULL and a false value (a ``SQL true'' value), is returned, and any remaining TESTs are not evaluated. If there were no expressions to evaluate to a SQL true value, the value of any of the expressions to evaluate to a SQL NULL is returned. If there were no such expressions as well, #f is returned.

(sql-or 1) => 1
(sql-or #t (sql-null) 2) => #t
(sql-or #f (sql-null)) => SQL-NULL
(sql-or #f (sql-null) 1) => 1

In the absence of the expressions that evaluate to SQL NULL values, the semantics is the same as for (or test-1 ...).