TL; DR "Compiled Result" is not a useful concept. It is important that the “specified result” is determined by the definition of the language. The DBMS should force the operator to act as you wrote it.
The truth [sic] table for AND in your link is incorrect. And with False, always False and OR with True is always True in SQL.
Comparison in SQL returns True, False, or Unknown. An unknown may arise from a comparison with NULL or 3VL logic logic (AND / OR / NOT, etc.) on Unknown. "NULL" is not literal. True, False and Unknown are values with (assorted) literals in the SQL standard, but not in most DBMSs. (And Unknown can be returned as NULL.) IS is not a match; IS NULL and NOT NULL are 3Vl unary logical relationships, as well as similar names with TRUE, FALSE, and UNKNOWN. They always return True or False.
True AND Null will be True AND Null and will delete the line. However, a compiled expression may return a string due to OR.
Not. The truth [sic] table for AND in your link is incorrect. And with False, always False and OR with True is always True in SQL. So your AND is always False from NOT False from AND of False from 1 <> 1, and your OR is always True from 1 = 1. No matter what other comparisons return (True, False or Unknown). If you work through these two expressions using (correct) SQL truth tables) , they both always give the same result, True.
You have to be very careful about rewriting conditions in SQL. You can exchange NOT (E1 *comparison* E2) for E1 *NOT-comparison* E2 or NOT (E IS ?) And E IS NOT ? . You can safely rewrite the expression using standard logical identifiers / rules if no value is NULL. You can also safely apply rewrite rules to
(E1 *comparison* E2) AND E1 IS NOT NULL AND E2 IS NOT NULL
Also be careful that you must correctly use the Unknown End Result, which includes not matching for WHERE, but not failing to limit.
SELECT 1 FROM TT LEFT JOIN T2 T2
LEFT JOIN returns INNER JOIN rows plus unsurpassed T rows extended by T2 NULL columns. (With T2 empty, INNER JOIN is empty, and all T lines are unmatched.) All extended lines have T2.id <> 99 Unknown, since T2.id is NULL. For T.id = 99, And is False, and NOT is true; WHERE returns all rows. For T1.id, any other integer or NULL, AND will be Unknown, NOT will be Unknown; WHERE does not return rows.
(There is no “short loop” evaluation in SQL. Each bundle argument must be defined.)