I have a Product table containing columns:
If there are multiple products with the same BrandID, TypeID, StyleID and ProductName one and only one of the records needs to have IsFeatured set to 1. How can I enforce this at the DB level?
I am thinking that I will need to create seperate Insert, Update and Delete triggers on the table to validate the modification. If the modification results in more-than-one or less-than-one product record having the same BrandID, TypeID, StyleID and ProductName fields with the IsFeatured column selected rollback the change.
This is a SQL Server 2000 database.
Any advice greatly appreciated!