• Hi Steve,

    to your question on "how can you explain that those rows are removed? One other thing to notice is that this query matches up using an inner join (the first plan). " in your second example  where b.id <> 8. I found a good article http://www.databasejournal.com/features/mssql/article.php/3399931 that says that " if your database or connection ANSI_NULL setting is set ON. An ANSI_NULL setting of ON is normally the default settings for databases and connections. When ANSI_NULL setting is set to ON, the ANSI SQL-92 standard states that any equal (=) or non equal (<&gt statement must equate to FALSE when compared against a NULL."

    that could possible explain the reason for why the null <> 8 returns false.

    Regards Canute.