Let’s say I’m having a table with three columns: UserId TeamId IsTeamCaptain. How can I make sure that there’s only one ‘true’ value in the IsTeamCaptain column per TeamId? So let’s say I have five different UserId’s all belonging to TeamId 1, then in those five there can only be one ‘true’, the rest must be ‘false’.
Let’s say I’m having a table with three columns: UserId TeamId IsTeamCaptain. How can
Share
Create a Unique Filtered Index on the Set(Filtered Index is introduced in SQL Server 2008)