>> +SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) IS NULL;
>> +SELECT * FROM t1 WHERE ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS UNKNOWN;
>> +SELECT * FROM t1 WHERE (( a, b ) NOT IN ( SELECT c, d FROM t2 )) IS UNKNOWN;
>
> as you add (), is it that
> ( a, b ) NOT IN ( SELECT c, d FROM t2 ) IS UNKNOWN
> stands for
> ( a, b ) NOT IN (( SELECT c, d FROM t2 ) IS UNKNOWN)
> ? Mmmm no that wouldn't be parsable, (c,d) can't be compared to UNKNOWN.
> Then maybe the added () are "just for fun"?
They are different, but equivalent, syntactic constructs, so it can have some
value in checking that the parser does a proper job.
They are both incarnations of:
<boolean test> ::= <boolean primary> [ IS [ NOT ] <truth value> ]
But in the first case, the <boolean primary> is a <predicate>, more precisely
an
<in predicate>.
In the second case, the <boolean primary> is a <boolean predicand>, which
traslates to a <parenthesized boolean value expression>, which is
<parenthesized boolean value expression>, which again is
<left paren> <boolean value expression> <right paren>.
Finally, the <boolean value expression> is translated to a <predicate>, as
above.
From your SQL oracle...