---
title: "Discussion on \"Two SQL NULL Traps: Missing JOIN Rows and UNIQUE Constraints That Do Nothing\" | Hashnode"
description: "Discussion on \"Two SQL NULL Traps: Missing JOIN Rows and UNIQUE Constraints That Do Nothing\". NULL behavior varies across databases and causes two common problems: JOIN on NULL columns returns no rows, and UNIQUE constraints allow multiple NULLs. Covers MySQL, PostgreSQL, SQLite, SQL Server with solutions for each."
url: "https://hashnode.com/posts/sql-null-join-unique/69e7d462d59c1b0bd9aee51d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Two SQL NULL Traps: Missing JOIN Rows and UNIQUE Constraints That Do Nothing](https://recca0120.hashnode.dev/sql-null-join-unique?utm_source=hashnode&utm_medium=feed)

NULL behavior varies across databases and causes two common problems: JOIN on NULL columns returns no rows, and UNIQUE constraints allow multiple NULLs. Covers MySQL, PostgreSQL, SQLite, SQL Server with solutions for each.

Apr 21 · 5 min read · recca0120.hashnode.dev  
Read the article

-   [#mysql](https://hashnode.com/tag/mysql)
-   [#null](https://hashnode.com/tag/null)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#sql](https://hashnode.com/tag/sql)
-   [#sqlite](https://hashnode.com/tag/sqlite)

## Written by

[recca0120](https://hashnode.com/@recca0120)

@recca0120 · Taipei, Taiwan

  
[View profile](https://hashnode.com/@recca0120)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
