jarlh comment above i.e. nothing compares TRUE to NULL except the IFNULL or 'null test. Therefore, if the request:
(SELECT P FROM BST)
returns one NULL, two SQL statements return different results. This can be easily demonstrated using the following two SQL statements:
select if (1 in (select null), 'a', 'b') => 'b'
select if (1 not in (select null), 'b', 'a') => 'a'
source
share