I'm trying to figure out the best way make sure that there is only one "active" row in a table at one time.
CREATE TABLE Test (
ID Int,
AmountMin int,
AmountMax int,
isActive bit )
Data in table.
ID AmountMin AmountMax isActive
1 100 200 0
2 100 300 1
3 200 550 0
4 300 700 0
How would I be able to make sure there's only one isActive true flag at any given time.
Thanks.