Help save net neutrality! Learn more.
Close

"WHERE NOT" statemement differences: version 2.2.8 / 2.3.2

Help
Alex
2014-07-11
2014-07-11
  • Alex

    Alex - 2014-07-11

    Hello,

    while switching from version 2.2.8 to 2.3.2, I observed different outputs for the following:

    CREATE TABLE TA (A INT);
    CREATE TABLE TB (B INT);
    INSERT INTO TA (A) VALUES (1);
    INSERT INTO TB (B) VALUES (2);
    INSERT INTO TB  (B) VALUES (NULL);
    SELECT * FROM TA WHERE A NOT IN (SELECT B FROM TB);
    

    In 2.2.8 I get the desired result set. But 2.3.2 does not return anything.
    Thanks for any advice!

     
  • Fred Toussi

    Fred Toussi - 2014-07-11

    It shouldn't return anything.

    IN tests for equality. The result of equality with NULL is UNKNOWN. The result of NOT with UNKNOWN is UNKNOWN.

     

Log in to post a comment.