I'm creating a table that'll have a single bit not null column IsDefault
. I need to write a constraint that'll make sure there'll be only one default value per UserId
(field in the same table).
I can't use unique constraint on this because it is possible to have many non-default values.
What is the best approach to do this using MS SQL Server 2008?
Thanks.