Suppose I have the following table in SQL Server:
I want to make Name unique IF IsRetired is 1. So the example above is fine because John appears only once when IsRetired is 1. However, I couldn't add another John and set IsRetired to 1.
is there a way to create a unique index for this?