Yes, it is "specific" to Microsoft SQL Server (in that some other database systems have the opposite approach, the one you expected - and the one defined in the ANSI standard, but I believe that other database systems exist which are the same as SQL Server).
If you are working on a version of SQL Server that supports filtered indexes, you can apply one of the following:
CREATE UNIQUE INDEX IX_T ON [Table] ([Column]) WHERE [Column] IS NOT NULL
(But keep in mind that this index cannot be the target of FK restrictions)
The βwhyβ really just comes down to the fact that it was implemented a long time ago (perhaps preliminary standards), and one of such awkward situations where it can be changed can now potentially violate many existing systems.
Re: Foreign Keys - you would be right if it were not for the fact that the NULL value in the foreign key column forces you not to check the foreign key - there is no way (in SQL Server) to use NULL as the actual key.
source share