---
title: "Comment by Viktor Novak on \"SQL NOT IN vs NOT EXISTS: Handling NULL Values Safely\" | Hashnode"
description: "The planner treats NOT IN as a different animal than NOT EXISTS, and that difference is rarely documented."
url: "https://hashnode.com/posts/sql-not-in-null-trap/6ae08e9544efbc8a069a8dd1/comment/6ae21c378cda9bb6dfc9ca6c"
---

[Discussion](https://hashnode.com/posts/sql-not-in-null-trap/6ae08e9544efbc8a069a8dd1)

Comment [SQL NOT IN vs NOT EXISTS: Handling NULL Values Safely](https://hashnode.com/posts/sql-not-in-null-trap/6ae08e9544efbc8a069a8dd1)

[Viktor Novak](https://hashnode.com/@viktornovak)

[Oct 28](https://hashnode.com/posts/sql-not-in-null-trap/6ae08e9544efbc8a069a8dd1/comment/6ae21c378cda9bb6dfc9ca6c)

The planner treats NOT IN as a different animal than NOT EXISTS, and that difference is rarely documented.
