SELECT
… FROM … WHERE …
AND :B1 = 1
UNION
SELECT … FROM … WHERE …
AND :B1 = 2;
•We normally think of UNION as an operation that discards duplicates between different SELECT blocks, but the above case never has such duplicates.
•However, UNION also
discards duplicates (most likely unintentionally!) within each SELECT block!
•UNION acts like DISTINCT, here!