Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • I'd your answer can be considered correct from function perspective (within SQL Server domain). BUT, you are wrong in understanding the concept of "index" and "key". To me, it is like you compare apple with orange. They are really different even if both are sweet and juicy. Commented Sep 13, 2016 at 23:51
  • Strictly speaking, a SQL Server unique index can contain a NULL value. It goes against the SQL spec by having unique indices disallow more than one instance of a NULL value. You can use filtered indices to simulate ANSI behavior, though. Commented Aug 28, 2018 at 21:57