chickadee » sql-null » sql-and

(sql-and TEST-1 ...)syntax

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

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

In the absence of the expressions that evaluate to SQL NULL values, the semantics is the same as for (and test-1 ...). One could think of the SQL NULL as "sticky"; as soon as it is encountered, it will be the result of the entire expression (unless #f is also encountered).