On Wed, 27 Jan 2016 14:17:49 -0500 Igor Tandetnik <igor at tandetnik.org> wrote:
> On 1/27/2016 2:10 PM, Yannick Duch?ne wrote: > > `UNIQUE` constraint allows multiple NULL: is this expected? > > http://www.sqlite.org/lang_createtable.html > "For the purposes of UNIQUE constraints, NULL values are considered > distinct from all other values, including other NULLs." > > I'm reasonably, but not 100%, sure this is standard-conforming. Thanks Igor. I overlooked it (and now feel to remember I use to know it and was as much surprised as I am now). Searching the web, it seems most DB don't allow multiple `NULL` on a column with a `UNIQUE` constraint. If the standard says any `NULL` differs from any `NULL`, so be it and these DB are wrong. Just that now I wonder the why. Is this related to something I don't know about, named `UNKNOWN` in SQL? If it's related, then I may understand. -- Yannick Duch?ne