We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Yes, you read that right. SQL does treat all
NULL
values differently. I learnt this a while back while working on Convoy and again on LiteQueue: a Golang a queueing library.Basically, any column with a
UNIQUE
constraint can have multipleNULL
values, because eachNULL
value is a distinct value that is different from other NULLs, and this is even less obvious if youβre used to using ORMs. I tested this with SQLite, Postgres and MySQL and they all behave like this. Letβs prove this with some examples
continue reading on jirevwe.github.io
β οΈ This post links to an external website. β οΈ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.