β οΈ This post links to an external website. β οΈ
Yes, you read that right. SQL does treat all
NULLvalues 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
UNIQUEconstraint can have multipleNULLvalues, because eachNULLvalue 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
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.